1

What is the Dependency property in WPF and Silverlight.

Why we required and where we can use it.

Thanks...

Klaus Byskov Pedersen
  • 117,245
  • 29
  • 183
  • 222
Jitendra Jadav
  • 903
  • 3
  • 13
  • 27

2 Answers2

3

From the documentation:

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.

Frédéric Hamidi
  • 258,201
  • 41
  • 486
  • 479
1

There is a good article on dependency properties here:

http://www.betterthaneveryone.com/archive/2010/01/24/wpf-silverlight-xaml-and-dependency-properties.aspx

Fenton
  • 241,084
  • 71
  • 387
  • 401