In WPF, what is a TemplatedParent?

前端 未结 3 2077
小鲜肉
小鲜肉 2020-12-29 20:48

I\'m trying to understand RelativeSource binding but I can\'t find a definition for TemplatedParent. MSDN says:

\"Gets a static value that is used to

3条回答
  •  失恋的感觉
    2020-12-29 21:43

    TemplatedParent refers to the Control instance that the template is being applied to. You can use TemplatedParent to bind to properties declared on that object (and its base classes).

提交回复
热议问题