回答

2

的RelativeSource(其中x:綁定)不支持,因此這種特殊情況是不可能的(在至少)。

使用TemplateBinding或標準綁定到TemplatedParent(如您所述)是解決方法。

TemplateBinding已經an optimized version綁定,根據本Build 2015 session by Sam Spencer.

+0

其實這不應該是什麼大不了的事的'RelativeSource'支持,只有'模式= FindAncestor'不是。 –

+0

@JustinXL唔,你確定嗎? https://cloud.githubusercontent.com/assets/2558207/9658304/b64f98da-5248-11e5-897d-79c55c7765cf.png –

+0

哦,我的意思是綁定,RelativeSource = ... –

相關問題