本文整理汇总了C#中System.Windows.Controls.ListBoxItem.SetValue方法的典型用法代码示例。如果您正苦于以下问题:C# ListBoxItem.SetValue方法的具体用法?C# ListBoxItem.SetValue怎么用?C# ListBoxItem.SetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Controls.ListBoxItem
的用法示例。
在下文中一共展示了ListBoxItem.SetValue方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetGivesHoverFeedback
public static void SetGivesHoverFeedback(ListBoxItem element, bool value)
{
element.SetValue(GivesHoverFeedbackProperty, value);
}
示例2: SetIsBroughtIntoViewWhenSelected
public static void SetIsBroughtIntoViewWhenSelected(ListBoxItem listBoxItem, bool value)
{
listBoxItem.SetValue(IsBroughtIntoViewWhenSelectedProperty, value);
}
示例3: IsSelectionActiveTest
public virtual void IsSelectionActiveTest ()
{
IPoker p = CurrentControl;
ListBoxItem item = new ListBoxItem ();
Assert.IsFalse ((bool) item.GetValue (ListBox.IsSelectionActiveProperty), "#1");
Assert.Throws<InvalidOperationException> (() => item.SetValue (ListBox.IsSelectionActiveProperty, true));
Assert.IsFalse ((bool) item.GetValue (ListBox.IsSelectionActiveProperty), "#2");
p.Items.Add (item);
p.SelectedItem = item;
Assert.IsFalse ((bool) item.GetValue (ListBox.IsSelectionActiveProperty), "#3");
p.SelectedIndex = -1;
Assert.IsFalse ((bool) item.GetValue (ListBox.IsSelectionActiveProperty), "#4");
Assert.AreSame (ComboBox.IsSelectionActiveProperty, ListBox.IsSelectionActiveProperty, "#5");
}
示例4: SetIsSelectible
public static void SetIsSelectible(ListBoxItem element, bool value)
{
element.SetValue(IsSelectibleProperty, value);
}
示例5: SetIsRecent
public static void SetIsRecent(ListBoxItem element, bool value)
{
element.SetValue(IsRecentProperty, value);
}
示例6: SetBringIntoViewNewItems
/// <summary>
/// Sets the IsBroughtIntoViewWhenSelected value
/// </summary>
/// <param name="listBoxItem"></param>
/// <param name="value"></param>
public static void SetBringIntoViewNewItems(ListBoxItem listBoxItem, bool value)
{
listBoxItem.SetValue(BringIntoViewNewItemsProperty, value);
}
示例7: SetHighlightForegroundBrush
public static void SetHighlightForegroundBrush(ListBoxItem element, Brush value)
{
element.SetValue(HighlightForegroundBrushProperty, value);
}
示例8: SetIsEnabled
public static void SetIsEnabled(ListBoxItem element, bool value)
{
element.SetValue(IsEnabledProperty, value);
}
示例9: SetBaseStyle
public static void SetBaseStyle(ListBoxItem element, Style value)
{
element.SetValue(BaseStyleProperty, value);
}
示例10: SetMoveDragFormat
/// <summary>
/// Sets the drag format when this instance is being dragged above or below another row.
/// </summary>
/// <param name="listBoxItem">The list box item.</param>
/// <param name="format">The drag format used when this instance is being dragged above or below another row.</param>
public static void SetMoveDragFormat(ListBoxItem listBoxItem, string format)
{
listBoxItem.SetValue(MoveDragFormatProperty, format);
}
示例11: SetMoveDragContentTemplate
/// <summary>
/// Sets the content template when this instance is being dragged above or below another row.
/// </summary>
/// <param name="listBoxItem">The list box item.</param>
/// <param name="value">A data template used when this instance is being dragged above or below another row.</param>
public static void SetMoveDragContentTemplate(ListBoxItem listBoxItem, DataTemplate value)
{
listBoxItem.SetValue(MoveDragContentTemplateProperty, value);
}
示例12: SetMoveBelowCommand
/// <summary>
/// Sets the command used to move another row below this one using drag and drop.
/// </summary>
/// <param name="listBoxItem">The list box item.</param>
/// <param name="command">The command to move a row below this instance.</param>
public static void SetMoveBelowCommand(ListBoxItem listBoxItem, ICommand command)
{
listBoxItem.SetValue(MoveBelowCommandProperty, command);
}
示例13: SetIsDeselectionEnabled
/// <summary>
/// Sets the deselection enabled property. If enabled, and the row is clicked while selected, the row is deselected.
/// </summary>
/// <param name="listBoxItem">The list box item.</param>
/// <param name="value">if set to <c>true</c> deselects the row when selected and clicked.</param>
public static void SetIsDeselectionEnabled(ListBoxItem listBoxItem, bool value)
{
listBoxItem.SetValue(IsDeselectionEnabledProperty, value);
}