Mega Code Archive

 
Categories / VB.Net Tutorial / WPF
 

Embdded implementation of our buttons Click event handler

<Window x: Class="SimpleXamlApp.MainWindow"   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">   <Button Width="133" Height="24" Name="btnExitApp" Click ="btnExitApp_Clicked">     Exit Application   </Button>   <x:Code>     private void btnExitApp_Clicked(object sender, RoutedEventArgs e)     {     Application.Current.Shutdown();     }   </x:Code> </Window>