I expect the following Style
to affect any Border
that is child of the Expander
object to which this Style
is applied to have a 1-pixel thick gray border. Why doesn't it work?
<Style TargetType="Expander">
<Setter Property="ContentTemplate">
<Setter.Value>
<DataTemplate>
<Border>
<Border.Resources>
<Style TargetType="Border">
<Setter Property="BorderBrush" Value="Gray" />
<Setter Property="BorderThickness" Value="1" />
</Style>
</Border.Resources>
<ContentPresenter Content="{Binding}" />
</Border>
</DataTemplate>
</Setter.Value>
</Setter>
</Style>