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