//File:Window.xaml.vb Imports System Imports System.IO Imports System.Net Imports System.Windows Imports System.Windows.Controls Imports System.Windows.Data Imports System.Windows.Input Imports System.Windows.Media Imports System.Windows.Media.Animation Imports System.Windows.Navigation Namespace InputExamples Public Partial Class EventHandling Public Sub New() Me.InitializeComponent() End Sub Private Sub ClickHandler(sender As Object, e As RoutedEventArgs) Dim clicked As Button = TryCast(e.Source, Button) MessageBox.Show([String].Format("{0} was clicked!", clicked.Name)) End Sub Private Sub ButtonMouseUpHandler(sender As Object, e As MouseButtonEventArgs) Dim clicked As Button = TryCast(sender, Button) clicked.Content = [String].Format("{0} clicked", clicked.Name) End Sub End Class End Namespace