Button three is the default button.
//File:Window.xaml.vb
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
MessageBox.Show("You pressed " & source.Name, Title)
End If
End Sub
End Class
End Namespace