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


C# ListBoxItem.GetValue方法代码示例

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


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

示例1: GetIsBroughtIntoViewWhenSelected

        public static bool GetIsBroughtIntoViewWhenSelected(ListBoxItem listBoxItem)
        {
            if (listBoxItem != null)
            {
                return (bool)listBoxItem.GetValue(IsBroughtIntoViewWhenSelectedProperty);
            }

            return false;
        }
开发者ID:blacktau,项目名称:temporaltwist,代码行数:9,代码来源:BringIntoViewWhenSelectedListBoxItemBehaviour.cs

示例2: GetGivesHoverFeedback

 public static bool GetGivesHoverFeedback(ListBoxItem element)
 {
     return (bool)element.GetValue(GivesHoverFeedbackProperty);
 }
开发者ID:squaredinfinity,项目名称:Foundation,代码行数:4,代码来源:ListBoxItem.IsSelectible.cs

示例3: GetIsSelectible

 public static bool GetIsSelectible(ListBoxItem element)
 {
     return (bool)element.GetValue(IsSelectibleProperty);
 }
开发者ID:squaredinfinity,项目名称:Foundation,代码行数:4,代码来源:ListBoxItem.IsSelectible.cs

示例4: 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");
		}
开发者ID:dfr0,项目名称:moon,代码行数:15,代码来源:SelectorTest.cs

示例5: GetBringIntoViewNewItems

 /// <summary>
 /// Gets the IsBroughtIntoViewWhenSelected value
 /// </summary>
 /// <param name="listBoxItem"></param>
 /// <returns></returns>
 public static bool GetBringIntoViewNewItems(ListBoxItem listBoxItem)
 {
     return (bool)listBoxItem.GetValue(BringIntoViewNewItemsProperty);
 }
开发者ID:klot-git,项目名称:scrum-factory,代码行数:9,代码来源:ListBringIntoViewBehavior.cs

示例6: GetIsRecent

 public static bool GetIsRecent(ListBoxItem element)
 {
     return (bool)element.GetValue(IsRecentProperty);
 }
开发者ID:RolandPheasant,项目名称:TailBlazer,代码行数:4,代码来源:ListboxItemHighlightAssist.cs

示例7: GetIsEnabled

 public static bool GetIsEnabled(ListBoxItem element)
 {
     return (bool)element.GetValue(IsEnabledProperty);
 }
开发者ID:RolandPheasant,项目名称:TailBlazer,代码行数:4,代码来源:ListboxItemHighlightAssist.cs

示例8: GetIsDeselectionEnabled

 /// <summary>
 /// Gets 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>
 /// <returns>
 ///   <c>true</c> if deselecting row when selected and clicked, otherwise <c>false</c>.
 /// </returns>
 public static bool GetIsDeselectionEnabled(ListBoxItem listBoxItem)
 {
     return (bool)listBoxItem.GetValue(IsDeselectionEnabledProperty);
 }
开发者ID:ruisebastiao,项目名称:Elysium-Extra,代码行数:11,代码来源:ListBoxItemAttached.cs

示例9: GetBaseStyle

 public static Style GetBaseStyle(ListBoxItem element)
 {
     return (Style)element.GetValue(BaseStyleProperty);
 }
开发者ID:RolandPheasant,项目名称:TailBlazer,代码行数:4,代码来源:ListboxItemHighlightAssist.cs

示例10: ToggleSingleSelection

        private void ToggleSingleSelection(ListBoxItem item)
        {
            bool isSelected = !(bool)item.GetValue(Selector.IsSelectedProperty);

            SelectedItem = isSelected ? ItemContainerGenerator.ItemFromContainer(item) : null;

            for (int i = 0; i < ItemContainerGenerator.ItemsCount; i++)
            {
                DependencyObject itemContainer = ItemContainerGenerator.Generate(i);
                itemContainer.SetCurrentValue(Selector.IsSelectedProperty, itemContainer == item && isSelected);
            }
        }
开发者ID:highzion,项目名称:Granular,代码行数:12,代码来源:ListBox.cs

示例11: ToggleSelection

 private void ToggleSelection(ListBoxItem item)
 {
     item.SetCurrentValue(Selector.IsSelectedProperty, !(bool)item.GetValue(Selector.IsSelectedProperty));
 }
开发者ID:highzion,项目名称:Granular,代码行数:4,代码来源:ListBox.cs

示例12: GetMoveDragFormat

 /// <summary>
 /// Gets the drag format when this instance is being dragged above or below another row.
 /// </summary>
 /// <param name="listBoxItem">The list box item.</param>
 /// <returns>
 /// The drag format used when this instance is being dragged above or below another row.
 /// </returns>
 public static string GetMoveDragFormat(ListBoxItem listBoxItem)
 {
     return (string)listBoxItem.GetValue(MoveDragFormatProperty);
 }
开发者ID:ruisebastiao,项目名称:Elysium-Extra,代码行数:11,代码来源:ListBoxItemAttached.cs

示例13: GetMoveDragContentTemplate

 /// <summary>
 /// Gets the content template when this instance is being dragged above or below another row.
 /// </summary>
 /// <param name="listBoxItem">The list box item.</param>
 /// <returns>
 /// A data template used when this instance is being dragged above or below another row.
 /// </returns>
 public static DataTemplate GetMoveDragContentTemplate(ListBoxItem listBoxItem)
 {
     return (DataTemplate)listBoxItem.GetValue(MoveDragContentTemplateProperty);
 }
开发者ID:ruisebastiao,项目名称:Elysium-Extra,代码行数:11,代码来源:ListBoxItemAttached.cs

示例14: GetMoveBelowCommand

 /// <summary>
 /// Gets the command used to move another row below this one using drag and drop.
 /// </summary>
 /// <param name="listBoxItem">The list box item.</param>
 /// <returns>
 /// The command to move a row below this instance.
 /// </returns>
 public static ICommand GetMoveBelowCommand(ListBoxItem listBoxItem)
 {
     return (ICommand)listBoxItem.GetValue(MoveBelowCommandProperty);
 }
开发者ID:ruisebastiao,项目名称:Elysium-Extra,代码行数:11,代码来源:ListBoxItemAttached.cs

示例15: GetIsActive

 public static bool GetIsActive(ListBoxItem obj)
 {
     return (bool)obj.GetValue(IsActiveProperty);
 }
开发者ID:Boddlnagg,项目名称:WordsLive,代码行数:4,代码来源:Activator.cs


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