I am trying to access a property of a sibling element that comes directly BEFORE the target element. This is something I will have to duplicate several times in my app so I'd rather use something reproduceable (not elementName) if possible.
Any Ideas?
<Groupbox x:Name="GB1">
<Checkbox x:Name="CB1" IsChecked="True"/>
<TextBlock>
<Style TargetType="TextBlock">
<Style.Triggers>
<Data.Trigger Binding RelativeSource={??? (I want this to access the Checkbox CB1 above), Path=IsChecked}" Value="True>
<Setter Property="*Do a Thing if IsChecked=True*" Value="..."/>
</Style.Triggers>
</Style>
</TextBlock>
</Groupbox>
Maybe this example will give you an idea.
Path=Children[0].Text
it will look for the first child element of this ancestor and access its Text property.