什么是WPF中的依赖属性 [英] What is the Dependency property in WPF

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

问题描述

什么是WPF和Silverlight的依赖属性。

What is the Dependency property in WPF and Silverlight.

为什么我们需要的,而且我们可以使用它。

Why we required and where we can use it.

谢谢...

推荐答案

文档

依赖属性的目的
  是提供一种方法来计算
  基于该值的属性的值
  其他投入。这些其他投入
  可能包括系统性能,例如
  作为主题和用户preference,
  刚刚在时间性能测定
  机制,如数据绑定和
  动画/故事板,多种用途
  模板,如资源和
  通过样式,或值知
  与其他父子关系
  在元素树元素。

The purpose of dependency properties is to provide a way to compute the value of a property based on the value of other inputs. These other inputs might include system properties such as themes and user preference, just-in-time property determination mechanisms such as data binding and animations/storyboards, multiple-use templates such as resources and styles, or values known through parent-child relationships with other elements in the element tree.

所以,他们像正常的特性,但它们的价值可以从其他属性的值进行自动计算。

So they're like normal properties, but their value can be automatically computed from the values of other properties.

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

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