public void Execute(object parameter) { RadialMenuItemContext context = parameter as RadialMenuItemContext; var viewModel = context.CommandParameter as ViewModel; viewModel.lastPictureInfo.IsOpen = false; }
private RadialMenuItemContext GetCommandContext() { RadialMenuItemContext context = this.Owner.GetCommandContext(); context.MenuItem = this; context.CommandParameter = this.CommandParameter; return(context); }
internal void UpdateIsEnabled() { if (this.Owner != null && this.Command != null) { RadialMenuItemContext context = this.GetCommandContext(); this.IsEnabled = this.Command.CanExecute(context); } }
internal void ExecuteCommand() { RadialMenuItemContext context = this.GetCommandContext(); if (this.Command != null && this.Command.CanExecute(context)) { this.Command.Execute(context); } }