本文整理汇总了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);
}
示例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);
}
}
}
示例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);
}