There are two ways to achieve the binding element in the template to a parent
1、<ContentPresenter Margin=”{TemplateBinding Padding}”/>
2、Color=”{Binding RelativeSource={RelativeSource TemplatedParent},
Path=Background.Color}”/>
There are two ways to achieve the binding element in the template to a parent
1、<ContentPresenter Margin=”{TemplateBinding Padding}”/>
2、Color=”{Binding RelativeSource={RelativeSource TemplatedParent},
Path=Background.Color}”/>