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