I want to set the CommandTarget of the MenuItem of ContextMenu, in a Style, to the Style target, i.e., the control on which the style applies.
<Style x:Key="AAA" TargetType="{x:Type BBB}">
<Setter Property="ContextMenu">
<Setter.Value>
<ContextMenu>
<MenuItem Command="{x:Static CCC}" CommandTarget="{Binding ???}"/>
</ContextMenu>
</Setter.Value>
</Setter>
</Style>
I Have tried RelativeSource TemplatedParent, Self, FindAncestor, none of them works. Is there any other way to select the target?