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