本文整理汇总了C#中System.Windows.Controls.MenuItem.GetValue方法的典型用法代码示例。如果您正苦于以下问题:C# MenuItem.GetValue方法的具体用法?C# MenuItem.GetValue怎么用?C# MenuItem.GetValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Windows.Controls.MenuItem
的用法示例。
在下文中一共展示了MenuItem.GetValue方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: GetGroupName
public static String GetGroupName(MenuItem element)
{
return element.GetValue(GroupNameProperty).ToString();
}
示例2: GetGroupName
public static string GetGroupName(MenuItem menuItem)
{
return menuItem.GetValue(GroupNameProperty).ToString();
}
示例3: GetGroupName
/// <summary>
/// Gets the GroupName property for this object.
/// </summary>
/// <param name="element">The element.</param>
/// <returns></returns>
public static String GetGroupName(MenuItem element)
{
if (element == null) { throw new ArgumentNullException("element"); }
return element.GetValue(GroupNameProperty).ToString();
}
示例4: GetCommandStateChangeTrigger
public static object GetCommandStateChangeTrigger(MenuItem mi)
{
return (object)mi.GetValue(CommandStateChangeTriggerProperty);
}
示例5: GetClickCommandParameter
public static object GetClickCommandParameter(MenuItem mi)
{
return (object)mi.GetValue(ClickCommandParameterProperty);
}
示例6: GetClickCommand
public static ICommand GetClickCommand(MenuItem mi)
{
return (ICommand)mi.GetValue(ClickCommandProperty);
}
示例7: GetMenuItemClickCommandBehavior
static MenuItemClickCommandBehavior GetMenuItemClickCommandBehavior(MenuItem mi)
{
return mi.GetValue(MenuItemClickCommandBehaviorProperty) as MenuItemClickCommandBehavior;
}
示例8: GetShowAvailableDrives
/// <summary>
/// The get show available drives.
/// </summary>
/// <param name="element">
/// The element.
/// </param>
/// <returns>
/// The <see cref="bool"/>.
/// </returns>
public static Boolean GetShowAvailableDrives(MenuItem element)
{
bool result;
return bool.TryParse(element.GetValue(ShowAvailableDrivesProperty).ToString(), out result) && result;
}