Skip to Main Content
Visual Basic 2015 Unleashed
book

Visual Basic 2015 Unleashed

by Alessandro Del Sole
July 2015
Intermediate to advanced content levelIntermediate to advanced
1300 pages
87h 27m
English
Sams
Content preview from Visual Basic 2015 Unleashed

Presenting Data with the ListBox Control

The ListBox control enables listing a series of items. The good news is that you are not limited to text items but can also add complex items. Each item is represented by a ListBoxItem object, nested in the ListBox. The following example shows how you can declare a ListBox in XAML code:

<ListBox Name="ListBox1">    <ListBoxItem Content="Item 1"/>    <ListBoxItem Content="Item 2"/>    <!-- Creating a complex item,         with text and picture -->    <ListBoxItem>        <ListBoxItem.Content>            <StackPanel>                <TextBlock Text="Item 3 with image"/>                <Image Source="MyImage.jpg" />            </StackPanel>        </ListBoxItem.Content>    </ListBoxItem> ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Beginning Visual Basic 2015

Beginning Visual Basic 2015

Bryan Newsome

Publisher Resources

ISBN: 9780134196664Purchase book