如何最轻松地确定某个属性是否为依赖项属性? [英] How can I most easily determine whether a property is a dependency property?

查看:92
本文介绍了如何最轻松地确定某个属性是否为依赖项属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我最近在将数据绑定到DataGridTextColumn的Visibility属性时遇到问题。之所以引起混乱,是因为该属性在WPF中是一个依赖属性,而在Silverlight中却不是。

I recently had an issue with databinding to the Visibility property of a DataGridTextColumn. The confusion arose because this property is a dependecy property in WPF but not in Silverlight.

我认为MSDN文档并不十分清楚。以下是WPF的唯一相关文本。

I don't think that the MSDN documentation makes this very clear. The following is the only related text for WPF.

有关可影响该值的信息,请参阅DependencyProperty。

"For information about what can influence the value, see DependencyProperty."

http://msdn.microsoft.com/zh-cn/library/system.windows.controls.datagridcolumn.visibility(v=VS.100).aspx

推荐答案

相关性属性在其定义的类上具有一个对应的静态字段。请查看 DataGridTextColumn 类。

Dependency properties have a corresponding static field on the class they are defined in. Have a look at the fields section of the DataGridTextColumn class.

这篇关于如何最轻松地确定某个属性是否为依赖项属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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