Mega Code Archive
Get a handle to the current app and shut it down
//File:Window.xaml.cs
using System;
using System.Windows;
using System.Windows.Controls;
namespace WpfApplication1
{
public partial class MainWindow : Window
{
public MainWindow()
{
InitializeComponent();
}
private void btnExitApp_Clicked(object sender, RoutedEventArgs e)
{
Application.Current.Shutdown();
}
}
}