WPF VB.Net Tutorial

    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="WPF" Height="100" Width="300">
    
                        Name="button1" Width="75">Button _One
                        Name="button2" Width="75">Button _Two
                        Name="button3" Width="75">Button T_hree
    

//File:Window.xaml.vb
Imports System
Imports System.Windows
Imports System.Windows.Controls
Namespace WpfApplication1
  Public Partial Class Window1
    Inherits Window
    Public Sub New()
      InitializeComponent()
    End Sub
    Private Sub SharedButtonClickHandler(sender As Object, e As RoutedEventArgs)
      Dim source As Button = TryCast(e.OriginalSource, Button)
      If source IsNot Nothing Then
        Dim message As String = [String].Format("{0} was pressed.", source.Content)
        MessageBox.Show(message, Title)
      End If
    End Sub
  End Class
End Namespace