Inheritance of System.Windows.Controls.Expander :
System.Object
System.Windows.Threading.DispatcherObject
System.Windows.DependencyObject
System.Windows.Media.Visual
System.Windows.UIElement
System.Windows.FrameworkElement
System.Windows.Controls.Control
System.Windows.Controls.ContentControl
System.Windows.Controls.HeaderedContentControl
System.Windows.Controls.Expander
![]() | An Expander wraps a region of content that the user can show or hide by clicking a small arrow. It is used frequently in online help and on web pages to allow them to include large amounts of temporal content. The image shows a Grid of 4 collapsed Expanders with 4 ExpandDirections. When an Expander is collapsed, its arrow points in the direction where it will expand. |
<Page xmlns ="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Width="300">
<Page.Resources>
<Style TargetType="{x:Type TextBlock}">
<Setter Property="TextWrapping" Value="Wrap"/>
<Setter Property="Text" Value=
"Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
Nam mi sapien, viverra et, lacinia varius, ullamcorper sed, sapien."/>
</Style>
<Style TargetType="{x:Type Expander}">
<Setter Property="Margin" Value="5"/>
<Setter Property="Padding" Value="5"/>
<Setter Property="BorderThickness" Value="1"/>
<Setter Property="BorderBrush" Value="Black"/>
<Setter Property="Margin" Value="5"/>
</Style>
</Page.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="Auto"></RowDefinition>
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
<ColumnDefinition></ColumnDefinition>
<ColumnDefinition></ColumnDefinition>
</Grid.ColumnDefinitions>
<Expander Header="E 1">
<TextBlock/>
</Expander>
<Expander Header="E 2" Grid.Column="1" ExpandDirection="Right">
<TextBlock/>
</Expander>
<Expander Header="E 3" Grid.Row="1" ExpandDirection="Up">
<TextBlock/>
</Expander>
<Expander Header="E 4" Grid.Row="1" Grid.Column="1" ExpandDirection="Left">
<TextBlock/>
</Expander>
</Grid>
</Page>
When you are in the Internet Explorer run Expander.xaml and click its items !