當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。