//File:Window.xaml.vb Imports System.Windows Imports System.Windows.Controls Public Partial Class AboutDialog Inherits Window Public Sub New() InitializeComponent() End Sub Private Sub ListBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) If e.AddedItems.Count > 0 Then MessageBox.Show("You just selected " & Convert.ToString(e.AddedItems(0))) End If End Sub Private Sub Button_Click(sender As Object, e As RoutedEventArgs) MessageBox.Show("You just clicked " & Convert.ToString(e.Source)) End Sub End Class