//File:Window.xaml.vb Imports System Imports System.Windows Imports System.Windows.Controls Namespace WpfApplication1 Public Partial Class MainWindow Inherits Window Public Sub New() InitializeComponent() End Sub Private Sub btnExitApp_Clicked(sender As Object, e As RoutedEventArgs) Application.Current.Shutdown() End Sub End Class End Namespace