//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 InnerListBoxItem_Selected(sender As Object, e As RoutedEventArgs) Dim item As ListBoxItem = TryCast(e.OriginalSource, ListBoxItem) If item IsNot Nothing Then MessageBox.Show(Convert.ToString(item.Content) & " was selected.", Title) End If End Sub Private Sub OuterListBox_SelectionChanged(sender As Object, e As SelectionChangedEventArgs) Dim item As Object = outerListBox.SelectedItem If item Is Nothing Then txtSelectedItem.Text = "No item currently selected." Else txtSelectedItem.Text = item.ToString() End If End Sub End Class End Namespace