예제 #1
0
        public void Execute(object parameter)
        {
            RadialMenuItemContext context = parameter as RadialMenuItemContext;
            var viewModel = context.CommandParameter as ViewModel;

            viewModel.lastPictureInfo.IsOpen = false;
        }
예제 #2
0
        private RadialMenuItemContext GetCommandContext()
        {
            RadialMenuItemContext context = this.Owner.GetCommandContext();

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

            return(context);
        }
예제 #3
0
        internal void UpdateIsEnabled()
        {
            if (this.Owner != null && this.Command != null)
            {
                RadialMenuItemContext context = this.GetCommandContext();

                this.IsEnabled = this.Command.CanExecute(context);
            }
        }
예제 #4
0
        internal void ExecuteCommand()
        {
            RadialMenuItemContext context = this.GetCommandContext();

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