The Expander is a standard WPF layout control.
The control has two states. In the collapsed state, which is the default, a small header and a button are visible but the child control of the Expander is hidden. When the user clicks the button the Expander grows in order to show its child control.
Expander allows its children to be hidden or displayed with a single click.
Code Behind:
- <Grid>
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto"/>
- <ColumnDefinition/>
- </Grid.ColumnDefinitions>
- <Grid.RowDefinitions>
- <RowDefinition Height="Auto"/>
- <RowDefinition Height="Auto"/>
- </Grid.RowDefinitions>
-
- <Expander Header="Show More Information" Grid.Row="1" Grid.Column="1">
- <TextBlock Margin="24 6 0 0">
- Text Line1<LineBreak/>
- 1. Text Line1<LineBreak/>
- 2. Text Line1<LineBreak/>
- 3. Text Line1
- </TextBlock>
- </Expander>
- </Grid>