WPF C# Tutorial

  xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  Title="My Xaml App" Height="200" Width="300" WindowStartupLocation ="CenterScreen">
  
    Exit Application
  

//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();
      }
  }
}