Organizing Controls with the Expander

The Expander control is a special kind of control container that can be expanded or collapsed and that is useful for organizing your controls. The following is an example of Expander with nested controls:

<Expander Name="Expander1" Header="Expand to view controls"          Background="LightBlue">    <StackPanel>        <ComboBox Name="Combo1" Margin="10">            <!-- Add your items here...-->        </ComboBox>        <ListBox Name="List1" Margin="10">            <!-- Add your items here...-->        </ListBox>    </StackPanel></Expander>

You must use a panel, as in the preceding example, if you want to add multiple visual elements because the Expander’s Content property ...

Get Visual Basic 2015 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.