Creating a custom dependency property


show more Creating a custom dependency property provides you with in-depth training on Developer. Taught by Walt Ritscher as part of the Silverlight 5 Essential Training show less
please wait ...

Creating a custom dependency property

Most properties on Silverlight Elements are Dependency Properties. When you create your own elements you should follow the same pattern and create Custom Dependency Properties. Let's review. The Dependency Properties System exists to provide services to your Silverlight Elements. For instance the services like Animation, Data Binding, Control Templates or Styles. Your elements can also partake in these services. If you were to implement your control properties only as .net properties, then sooner or later you will discover that you have created a UI element that cannot be animated or styled and that would be a tragedy.

To participate and create a dependency property, you have to register with the Dependency Property System. That means you have to write what I call ugly registration code. You will see what I mean about this ugliness in a few seconds. Microsoft has a naming convention which you can follow if you like. Microsoft always applies a property suffix to all dependency propert...

Creating a custom dependency property
Video duration: 4m 42s 8h 52m Beginner

Viewers:

Creating a custom dependency property provides you with in-depth training on Developer. Taught by Walt Ritscher as part of the Silverlight 5 Essential Training

Subject:
Developer
Software:
Silverlight Visual Studio
Author:
please wait ...