Exemplo n.º 1
0
        public void Execute(object parameter)
        {
            RadialMenuItemContext context = parameter as RadialMenuItemContext;
            var viewModel = context.CommandParameter as ViewModel;

            viewModel.lastPictureInfo.IsOpen = false;
        }
Exemplo n.º 2
0
        private RadialMenuItemContext GetCommandContext()
        {
            RadialMenuItemContext context = this.Owner.GetCommandContext();

            context.MenuItem         = this;
            context.CommandParameter = this.CommandParameter;

            return(context);
        }
Exemplo n.º 3
0
        internal void UpdateIsEnabled()
        {
            if (this.Owner != null && this.Command != null)
            {
                RadialMenuItemContext context = this.GetCommandContext();

                this.IsEnabled = this.Command.CanExecute(context);
            }
        }
Exemplo n.º 4
0
        internal void ExecuteCommand()
        {
            RadialMenuItemContext context = this.GetCommandContext();

            if (this.Command != null && this.Command.CanExecute(context))
            {
                this.Command.Execute(context);
            }
        }