WPFのバインディングテンプレート親

親にテンプレート内の結合要素を達成するには2つの方法があります。

1、<のContentPresenter証拠金=」{TemplateBindingのパディング}」/>

図2に示すように、カラー=」{バインディングRelativeSource = {RelativeSource TemplatedParent}、
パス= Background.Colorの}」/>

おすすめ

転載: www.cnblogs.com/tianmochou/p/11412365.html