所有的WPF控件属性是依赖属性。对或错? [英] All WPF control properties are dependency properties. True or False?

查看:204
本文介绍了所有的WPF控件属性是依赖属性。对或错?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在回答的这个问题我注意到,我从来没有碰到过这是不依赖任何财产(WPF控件,没有第三方控件)。虽然,当我开始使用WPF我记得读书的地方,更多的则90%WPF控件的属性都是依赖属性。

While answering this question I noticed that I have never come across any property which is not a dependency property (WPF Controls, no 3rd party controls). Although, when I started with WPF I remember reading somewhere that "more then 90% of properties of WPF controls are dependency properties".

谁能给CLR的例子/链接?在WPF控件的属性和它为什么如此

Can anyone give examples/links of CLR properties in WPF controls and why it's so?

更新:

碰上了本次讲座:
http://www.miszalok.de/Lectures/ L17_WPF / C4_DependencyProperties / DependencyProperties.pdf

它说:

标签具有传统的18和71依赖属性。

Label has 18 traditional and 71 dependency properties.

按钮有18个传统和78依赖属性。

Button has 18 traditional and 78 dependency properties.

推荐答案

借助 PasswordBox 属性的Password 没有实现为依赖项属性不允许数据绑定,这将是一个安全隐患,否则。请参见详情这篇文章

The PasswordBox property Password is not implemented as dependency property to not allow data binding, which would be a security risk otherwise. See this post for details.

这篇关于所有的WPF控件属性是依赖属性。对或错?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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