当前位置: 首页>>代码示例>>C#>>正文


C# ProgressBar.SetValue方法代码示例

本文整理汇总了C#中System.Windows.Controls.ProgressBar.SetValue方法的典型用法代码示例。如果您正苦于以下问题:C# ProgressBar.SetValue方法的具体用法?C# ProgressBar.SetValue怎么用?C# ProgressBar.SetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在System.Windows.Controls.ProgressBar的用法示例。


在下文中一共展示了ProgressBar.SetValue方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: SetIsError

 public static void SetIsError (ProgressBar d, bool value)
 {
     d.SetValue(IsErrorProperty, value);
 }
开发者ID:binki,项目名称:Alba.Framework,代码行数:4,代码来源:ProgressBarProps.g.cs

示例2: SetAnimationVisibility

 public static void SetAnimationVisibility (ProgressBar d, Visibility value)
 {
     d.SetValue(AnimationVisibilityProperty, value);
 }
开发者ID:binki,项目名称:Alba.Framework,代码行数:4,代码来源:ProgressBarProps.g.cs

示例3: SetSource

 public static void SetSource(ProgressBar bar, ProgressModel value)
 {
     if (bar == null) throw new ArgumentNullException("bar");
     bar.SetValue(SourceProperty, value);
 }
开发者ID:SLaks,项目名称:Progression,代码行数:5,代码来源:ProgressModel.cs

示例4: SetStopAnimationOnCompletion

 public static void SetStopAnimationOnCompletion(ProgressBar progressBar, bool value)
 {
     progressBar.SetValue(StopAnimationOnCompletionProperty, value);
 }
开发者ID:erikojebo,项目名称:gosu.mstestrunner,代码行数:4,代码来源:ProgressBarBehaviours.cs

示例5: HandleDoubleClick

        protected void HandleDoubleClick(object sender, MouseButtonEventArgs e)
        {
            if (iTabCount == 16)
            {
            MessageBox.Show(string.Format("Only 16 tabs may be open at a time",
                MessageBoxButton.OK, MessageBoxImage.Error));
            return;
            }

            ListViewItem lvi = sender as ListViewItem;
            var content = lvi.Content as AccountResultsViewModel;
            TabControl tabCtrl = FindParent(lvi, typeof (TabControl)) as TabControl;
            CloseableTabItem userItem = new CloseableTabItem();

            userItem.Header = content.AccountName;

            // get accountnum so we can keep the listboxes and listviews straight
            int accountnum = GetAcctNum((string)userItem.Header);
            AccountResultsViewModel ar = ViewModel.AccountResultsList[accountnum];

            try
            {

            if (urListView[accountnum] != null)
            {
                for (int i = 0; i < tabCtrl.Items.Count; i++)
                {
                    TabItem item = (TabItem)tabCtrl.Items[i];

                    if (item.Header.ToString() == content.AccountName)
                    {
                        tabCtrl.SelectedIndex = i;
                        break;
                    }
                }
                return;
            }
            iTabCount++;

            Grid urGrid = new Grid();

            // set up the grid's rows
            RowDefinition rowDef1 = new RowDefinition();
            RowDefinition rowDef2 = new RowDefinition();
            RowDefinition rowDef3 = new RowDefinition();
            RowDefinition rowDef4 = new RowDefinition();

            rowDef1.MaxHeight = 145;
            rowDef2.MaxHeight = 145;
            rowDef3.Height = GridLength.Auto;
            rowDef4.Height = GridLength.Auto;
            urGrid.Height = 330;                    // so we'll get  Vertical scrollviewer
            urGrid.RowDefinitions.Add(rowDef1);
            urGrid.RowDefinitions.Add(rowDef2);
            urGrid.RowDefinitions.Add(rowDef3);
            urGrid.RowDefinitions.Add(rowDef4);
            //

            // Set up the ListView
            urListView[accountnum] = new ListView();
            urListView[accountnum].FontSize = 11;
            urListView[accountnum].SetValue(Grid.RowProperty, 0);
            urListView[accountnum].Margin = new Thickness(5);
            urListView[accountnum].Name = "lstUserResults";

            GridView urGridView = new GridView();
            GridViewColumn gvc1 = new GridViewColumn();

            // set up columns widths so we won't get a horizontal scrollbar
            GridViewColumnHeader gvc1H = new GridViewColumnHeader();

            gvc1H.FontSize = 11;
            gvc1H.Width = 195;
            gvc1H.Content = " Folder";
            gvc1H.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Left;
            gvc1.DisplayMemberBinding = new Binding("FolderName");
            gvc1.Header = gvc1H;
            urGridView.Columns.Add(gvc1);

            GridViewColumn gvc2 = new GridViewColumn();
            GridViewColumnHeader gvc2H = new GridViewColumnHeader();

            gvc2H.FontSize = 11;
            gvc2H.Width = 130;
            gvc2H.Content = " Type";
            gvc2H.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Left;
            gvc2.DisplayMemberBinding = new Binding("TypeName");
            gvc2.Header = gvc2H;
            urGridView.Columns.Add(gvc2);

            GridViewColumn gvc3 = new GridViewColumn();
            GridViewColumnHeader gvc3H = new GridViewColumnHeader();

            gvc3H.FontSize = 11;
            gvc3H.Width = 120;
            gvc3H.Content = " Progress";
            gvc3H.HorizontalContentAlignment = System.Windows.HorizontalAlignment.Left;
            gvc3.DisplayMemberBinding = new Binding("UserProgressMsg");
            gvc3.Header = gvc3H;
            urGridView.Columns.Add(gvc3);
//.........这里部分代码省略.........
开发者ID:Ppalanivelu,项目名称:zimbra-sources,代码行数:101,代码来源:ResultsView.xaml.cs


注:本文中的System.Windows.Controls.ProgressBar.SetValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。