private void Executed(object sender, ExecutedRoutedEventArgs e) { var c = e.Command as RoutedUICommand; _commands.Add(c.Name); if (_isModal) { MessageBox.Show(""); } }