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


C# ModelItem.SetDesignerProperty方法代码示例

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


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

示例1: SetDesignTimeIsSelected

        /// <summary>
        /// Set the value of IsSelected, update any other TabItems,
        /// and raise change notification.
        /// </summary>
        /// <param name="item">The ModelItem representing a TabItem.</param>
        /// <param name="value">Value of the TabItem's IsSelected property.</param>
        public static void SetDesignTimeIsSelected(ModelItem item, bool value)
        {
            // If we are setting this one to true, set all the others to false.
            if (value)
            {
                UpdateIsSelectedForOtherTabs(item);
            }

            item.SetDesignerProperty(DesignTimeIsSelectedProperty, value);
            Util.InvalidateProperty(item, MyPlatformTypes.TabItem.IsSelectedProperty);
        }
开发者ID:kvervo,项目名称:HorizontalLoopingSelector,代码行数:17,代码来源:TabItemDesignModeValueProvider.cs

示例2: SetDesignTimeSelectedIndex

        /// <summary>
        /// Set the value of SelectedIndex and raise change notification.
        /// Make the selected TabItem the Active TabItem.
        /// </summary>
        /// <param name="item">Model item for the TabControl.</param>
        /// <param name="value">The SelectedIndex value.</param>
        public static void SetDesignTimeSelectedIndex(ModelItem item, int value)
        {
            item.SetDesignerProperty(DesignTimeSelectedIndexProperty, value);
            Util.InvalidateProperty(item, MyPlatformTypes.TabControl.SelectedIndexProperty);

            ModelProperty content = item.Content;
            ModelItemCollection tabControlChildCollection = null;

            // activate the corresponding TabItem
            if (content != null)
            {
                tabControlChildCollection = content.Collection;
                if (tabControlChildCollection != null && value <= tabControlChildCollection.Count)
                {
                    TabItemDesignModeValueProvider.SetDesignTimeIsSelected(tabControlChildCollection[value], true);
                }
            }
        }
开发者ID:kvervo,项目名称:HorizontalLoopingSelector,代码行数:24,代码来源:TabControlDesignModeValueProvider.cs

示例3: SetCurrentSelectedIndexPropertyValue

 /// <summary>
 /// Set the value of CurrentSelectedIndex.
 /// </summary>
 /// <param name="item">The model item for a TabControl.</param>
 /// <param name="value">CurrentSelectedIndex of the TabControl.</param>
 public static void SetCurrentSelectedIndexPropertyValue(ModelItem item, int value)
 {
     item.SetDesignerProperty(CurrentSelectedIndexValueProperty, value);
 }
开发者ID:kvervo,项目名称:HorizontalLoopingSelector,代码行数:9,代码来源:TabControlDesignModeValueProvider.cs


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