本文整理汇总了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);
}
示例2: SetAnimationVisibility
public static void SetAnimationVisibility (ProgressBar d, Visibility value)
{
d.SetValue(AnimationVisibilityProperty, value);
}
示例3: SetSource
public static void SetSource(ProgressBar bar, ProgressModel value)
{
if (bar == null) throw new ArgumentNullException("bar");
bar.SetValue(SourceProperty, value);
}
示例4: SetStopAnimationOnCompletion
public static void SetStopAnimationOnCompletion(ProgressBar progressBar, bool value)
{
progressBar.SetValue(StopAnimationOnCompletionProperty, value);
}
示例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);
//.........这里部分代码省略.........