Esempio n. 1
0
        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);
        }
Esempio n. 2
0
 public static ICommand GetCommand(AgMenuBase menu)
 {
     return(menu.GetValue(CommandProperty) as ICommand);
 }
Esempio n. 3
0
 public static void SetCommand(AgMenuBase menu, ICommand command)
 {
     menu.SetValue(CommandProperty, command);
 }