在 WPF 中,什么是 TemplatedParent? [英] In WPF, what is a TemplatedParent?

查看:27
本文介绍了在 WPF 中,什么是 TemplatedParent?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试了解 RelativeSource 绑定,但找不到 TemplatedParent 的定义.MSDN 说:

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

获取一个静态值,用于返回为 TemplatedParent 模式构造的 RelativeSource."

"Gets a static value that is used to return a RelativeSource constructed for the TemplatedParent mode."

它没有出现在Windows Presentation Foundation Unleashed"的索引中.

It doesn't appear in the index of "Windows Presentation Foundation Unleashed".

简单地说,什么是 TemplatedParent?

Simply, what is a TemplatedParent please?

推荐答案

TemplatedParent 指的是正在应用模板的 Control 实例.您可以使用 TemplatedParent 绑定到在该对象(及其基类)上声明的属性.

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).

这篇关于在 WPF 中,什么是 TemplatedParent?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆