What should I put for BasedOn
in this style?
<Style
x:Key="DataGrid_ColumnHeaderStyle"
TargetType="wt:DataGridColumnHeader"
BasedOn="??????????"> <!-- I want this to be a reference to the default style -->
<Setter
Property="BorderBrush"
Value="{StaticResource Media_RaisedBorderBrush}" />
<Setter
Property="Background"
Value="{StaticResource Media_RaisedBackgroundBrush}" />
<Setter
Property="Foreground"
Value="{StaticResource Media_RaisedForegroundBrush}" />
</Style>
I don't want to override the whole default style, I just want to change a handful of properties with setters.
EDIT:
I know how to use BasedOn
, I just don't know the name of the style I'm trying to base my style on or where to find it. What is the name of the default/built-in style?
Edit 2:
Okay, I guess this isn't what I needed after all. It doesn't seem to make any difference whether I include BasedOn="{StaticResource {x:Type wt:DataGridColumnHeader}}"
or not. The problem is that just setting the BorderBrush
, Background
, and Foreground
is causing the sort arrows to disappear. I don't understand why this is happening because the sort arrows are defined in the ControlTemplate
and I'm not editing/overriding the ControlTemplate
. Where are my sort arrows? (I definitely have sorting enabled, and clicking the column header does cause the data to sort...it just doesn't show the arrows.)