private static MenuClickedCommandBehavior GetOrCreateBehavior(AgMenuBase menu) { var behavior = menu.GetValue(MenuClickedCommandBehaviorProperty) as MenuClickedCommandBehavior; if (behavior == null) { behavior = new MenuClickedCommandBehavior(menu); menu.SetValue(MenuClickedCommandBehaviorProperty, behavior); } return(behavior); }
public static ICommand GetCommand(AgMenuBase menu) { return(menu.GetValue(CommandProperty) as ICommand); }
public static void SetCommand(AgMenuBase menu, ICommand command) { menu.SetValue(CommandProperty, command); }