Consider a custom control, with a ControlTemplate
defined via Style
in a ResourceDictionary
:
<Style TargetType="{x:Type local:MyControl}">
<Setter Property="Template">
<Setter.Value>
<ControlTemplate TargetType="{x:Type local:MyControl}">
....
Some where in that template, I have a ContentControl
which I want to set its content to the TemplatedParent
itself.
If I bind it to a property on the TemplatedParent
it works great:
Content="{TemplateBinding LayoutMode}"
But is there anyway to bind it to the TemplatedParent
Itself? And if not are there any workarounds?