为什么依赖性属性是“静态的”? [英] Why are dependency properties "static"?

查看:54
本文介绍了为什么依赖性属性是“静态的”?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

有人可以解释为什么将依赖项属性声明为静态吗?

Could someone please explain why dependency properties are declared as static ?

推荐答案

您声明为静态的字段只是<依赖项属性的em> identifier ,而不是属性的 value 。它在该类的所有实例之间共享,并用于获取/设置每个实例的属性值。

The field you declare as static is only the identifier of a dependency property, not the value of the property. It is shared across all instances of the class, and is used to get/set the value of the property for each instance.

这篇关于为什么依赖性属性是“静态的”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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