private void CloseButton_Click(object sender, ExecutedRoutedEventArgs e) { Application.Current.Shutdown(); }
public static RoutedCommand CustomCommand = new RoutedCommand(); private void CustomCommand_Executed(object sender, ExecutedRoutedEventArgs e) { // Custom command code } private void Button_Click(object sender, RoutedEventArgs e) { CustomCommand.Execute(null, sender); }The System.Windows.Input namespace is part of the WindowsBase.dll package/library, which is a core part of .NET Framework.