I'm having trouble selecting the correct template to manage the content of an expander control.
I'd like the content of an expander -- regardless of the type of control that is the content -- to be indented.
For example, an expander might have an expander as content, then the child expander might have a listbox, or a collection of textblocks.
Any help would be appreciated....
UPDATE:
Experimenting with a DataTemplate like this:
<DataTemplate x:Key="DataTemplate1">
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="20" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<ContentPresenter Grid.Row="1" /> <!-- With this in place, content doesn't show at all -->
</Grid>
</DataTemplate>
And using it like this:
<controls2:Expander Header="Two" ContentTemplate="{StaticResource DataTemplate1}">
So far, any attempts to deal with the content crashes the app when the Expander is expanded.