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


C# ItemsControl.SetValue方法代码示例

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


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

示例1: SetItemsDoubleClick

        public static void SetItemsDoubleClick(ItemsControl element, bool value)
        {
            element.SetValue(ItemsDoubleClickProperty, value);

            if (value)
            {
                element.PreviewMouseDoubleClick += new MouseButtonEventHandler(element_PreviewMouseDoubleClick);
            }
        }
开发者ID:cackharot,项目名称:SwizSales,代码行数:9,代码来源:Extentions.cs

示例2: EnsureInstance

        /// <summary> 
        ///     Get the instance of TextSearch attached to the given ItemsControl or make one and attach it if it's not.
        /// </summary> 
        /// <param name="itemsControl"></param> 
        /// <returns></returns>
        internal static TextSearch EnsureInstance(ItemsControl itemsControl) 
        {
            TextSearch instance = (TextSearch)itemsControl.GetValue(TextSearchInstanceProperty);

            if (instance == null) 
            {
                instance = new TextSearch(itemsControl); 
                itemsControl.SetValue(TextSearchInstancePropertyKey, instance); 
            }
 
            return instance;
        }
开发者ID:sjyanxin,项目名称:WPFSource,代码行数:17,代码来源:TextSearch.cs

示例3: SetColumnDefinitionsSource

 public static void SetColumnDefinitionsSource(ItemsControl obj, IEnumerable<ColumnDefinition> value)
 {
     obj.SetValue(ColumnDefinitionsSourceProperty, value);
 }
开发者ID:catwalkagogo,项目名称:Heron,代码行数:4,代码来源:GridItemsPanel.cs

示例4: SetItemContainersGeneratedCommand

 public static void SetItemContainersGeneratedCommand(ItemsControl ItemsControl, ICommand Value)
 {
     ItemsControl.SetValue(ItemContainersGeneratedCommandProperty, Value);
 }
开发者ID:ptownsend1984,项目名称:SampleApplications,代码行数:4,代码来源:ControlExtensions.cs

示例5: SetAutoUniformWidth

 public static void SetAutoUniformWidth(ItemsControl obj, bool value)
 {
     obj.SetValue(UseAutoUniformWidthProperty, value);
 }
开发者ID:squaredinfinity,项目名称:Foundation,代码行数:4,代码来源:UniformItemsSize.cs

示例6: SetItemsControlManager

 private static void SetItemsControlManager(ItemsControl itemsControl, ItemsControlManager value)
 {
     itemsControl.SetValue(ItemsControlManagerProperty, value);
 }
开发者ID:gitter-badger,项目名称:vc-community-1.x,代码行数:4,代码来源:VirtualListLoadingIndicator.cs

示例7: GetOrCreateItemsControlDropBehavior

        private static ItemsControlDropCommandBehavior GetOrCreateItemsControlDropBehavior(ItemsControl itemsControl)
        {
            var behavior = itemsControl.GetValue(ItemsControlDropCommandBehaviorProperty) as ItemsControlDropCommandBehavior;
            if (behavior == null)
            {
                behavior = new ItemsControlDropCommandBehavior(itemsControl);
                itemsControl.SetValue(ItemsControlDropCommandBehaviorProperty, behavior);
            }

            return behavior;
        }
开发者ID:NickSerg,项目名称:image-to-eps,代码行数:11,代码来源:DragDrop.cs

示例8: SetAnimationDuration

 /// <summary>
 /// Sets the duration of the animation.
 /// </summary>
 /// <param name="itemsControl">The items control.</param>
 /// <param name="value">The value.</param>
 public static void SetAnimationDuration(ItemsControl itemsControl, TimeSpan value)
 {
     itemsControl.SetValue(AnimationDurationProperty, value);
 }
开发者ID:newHopeLJP,项目名称:WPFContrib,代码行数:9,代码来源:ListItemMoveBehavior.cs

示例9: DropBehavior

 internal DropBehavior(ItemsControl element)
 {
     _element = element;
     _element.SetValue(BehaviorProperty,this);
     RegisterEvent();
 }
开发者ID:Mrding,项目名称:Ribbon,代码行数:6,代码来源:DragAndDropControl.cs

示例10: SetItemContainersGeneratedCommandWeakEventListener

 private static void SetItemContainersGeneratedCommandWeakEventListener(ItemsControl Element, IWeakEventListener Value)
 {
     Element.SetValue(ItemContainersGeneratedCommandWeakEventListenerProperty, Value);
 }
开发者ID:ptownsend1984,项目名称:SampleApplications,代码行数:4,代码来源:ControlExtensions.cs

示例11: SetScrollToNewItemWeakEventListener

 private static void SetScrollToNewItemWeakEventListener(ItemsControl Element, IWeakEventListener Value)
 {
     Element.SetValue(ScrollToNewItemWeakEventListenerProperty, Value);
 }
开发者ID:ptownsend1984,项目名称:SampleApplications,代码行数:4,代码来源:ControlExtensions.cs

示例12: SetScrollToNewItemFocusSpecificElementName

 public static void SetScrollToNewItemFocusSpecificElementName(ItemsControl ItemsControl, string Value)
 {
     ItemsControl.SetValue(ScrollToNewItemFocusSpecificElementNameProperty, Value);
 }
开发者ID:ptownsend1984,项目名称:SampleApplications,代码行数:4,代码来源:ControlExtensions.cs

示例13: SetScrollToNewItem

 public static void SetScrollToNewItem(ItemsControl ItemsControl, bool Value)
 {
     ItemsControl.SetValue(ScrollToNewItemProperty, Value);
 }
开发者ID:ptownsend1984,项目名称:SampleApplications,代码行数:4,代码来源:ControlExtensions.cs

示例14: SetItemContainersGeneratedCommandParameter

 public static void SetItemContainersGeneratedCommandParameter(ItemsControl ItemsControl, object Value)
 {
     ItemsControl.SetValue(ItemContainersGeneratedCommandParameterProperty, Value);
 }
开发者ID:ptownsend1984,项目名称:SampleApplications,代码行数:4,代码来源:ControlExtensions.cs

示例15: SetGroupStyles

 /// <summary>
 /// Sets the group styles.
 /// </summary>
 /// <param name="itemsControl">The items control.</param>
 /// <param name="value">The value.</param>
 public static void SetGroupStyles(ItemsControl itemsControl, GroupStyleCollection value)
 {
     itemsControl.SetValue(GroupStylesProperty, value);
 }
开发者ID:Krisscut,项目名称:InvolvedRCON,代码行数:9,代码来源:ItemsControlAttached.cs


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