Is it possible to use a style trigger from another control?
I have Border
control which lives in the indicator part of each row of a grid (the indicator is the part on the very left with the little arrow). I want to set the background depending if the row is selected. So I created a style:
<controls:SelectionConverter x:Key="SelectionConverter" />
<Style x:Key="SelectionStyle" TargetType="Border">
<Setter Property="Background" Value="{Binding Converter={StaticResource SelectionConverter}}"/>
<Style.Triggers>
<!-- here I want to have a trigger which reacts on a property of the grid control -->
</Style.Triggers>
</Style>
The border control then will use the style (in fact there are 3 border controls).
The SelectionConverter
will return the correct color depending on the row (that works fine).
The problem is that the background is not updated when I select a different cell (which does make sense, because there is no trigger when to update it).
Is it possible to setup a trigger of the parent control?
Something alone the line
<Trigger Property="ParentControl.SelectionHasChanged" Value="True"></Trigger>