Create a style that will produce a horizontal ListBox
Item 1Item 2Item 3Item 4Item 5Item 6Item 7Item 8Item 9Item 10
//File:Window.xaml.vb
Imports System
Imports System.ComponentModel
Imports System.Windows
Imports System.Windows.Controls
Imports System.Windows.Documents
Imports System.Windows.Navigation
Imports System.Windows.Shapes
Imports System.Windows.Data
Namespace ListBox_Index
Public Partial Class Window1
Inherits Window
Public Sub New()
InitializeComponent()
End Sub
Private Sub PrintText(sender As Object, args As SelectionChangedEventArgs)
Dim lbi As ListBoxItem = TryCast(TryCast(sender, ListBox).SelectedItem, ListBoxItem)
If lbi Is Nothing Then
Return
End If
label1.Content = "You chose " & lbi.Content.ToString() & "."
End Sub
End Class
End Namespace