//To close just one window this.Close(); //To close the entire application System.Windows.Application.Current.Shutdown();