public static String GetGroupName(MenuItem element) { return element.GetValue(GroupNameProperty).ToString(); }
public static string GetGroupName(MenuItem menuItem) { return menuItem.GetValue(GroupNameProperty).ToString(); }
/// <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(); }
public static object GetCommandStateChangeTrigger(MenuItem mi) { return (object)mi.GetValue(CommandStateChangeTriggerProperty); }
public static object GetClickCommandParameter(MenuItem mi) { return (object)mi.GetValue(ClickCommandParameterProperty); }
public static ICommand GetClickCommand(MenuItem mi) { return (ICommand)mi.GetValue(ClickCommandProperty); }
static MenuItemClickCommandBehavior GetMenuItemClickCommandBehavior(MenuItem mi) { return mi.GetValue(MenuItemClickCommandBehaviorProperty) as MenuItemClickCommandBehavior; }
/// <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; }