The class allows the propagations of data context from the collection to its members. But it is only for SilverLight.
More info for DepedencyObjectCollection
can be found from this post.
If the equivalent doesn't exist, what's the necessary steps required to create one?
I observe the desire behavior from the RowDefinitionCollection
class. But I couldn't figure out its implementation.
thanks
The DependencyObject class enables Windows Presentation Foundation (WPF) property system services on its many derived classes. The property system's primary function is to compute the values of properties, and to provide system notification about values that have changed.
Dependency properties are used when you want data binding in a UserControl , and is the standard method of data binding for the WPF Framework controls. DPs have slightly better binding performance, and everything is provided to you when inside a UserControl to implement them.
A Dependency Property is a property whose value depends on the external sources, such as animation, data binding, styles, or visual tree inheritance. Not only this, but a Dependency Property also has the built-in feature of providing notification when the property has changed, data binding and styling.
An attached property is a Extensible Application Markup Language (XAML) concept. Attached properties enable extra property/value pairs to be set on any XAML element that derives from DependencyObject, even though the element doesn't define those extra properties in its object model.
The short answer is NO.
But I no longer think it is the correct implementation anyway. I end up using a collection of FrameworkElement and add them into the LogicalChildren of the custom control. By doing so, DataContext are passed on to the FrameworkElement naturally and everything works as expected.
It seems that that's how RowDefinition class is implemented in .NET 4.0. However, Silverlight version of RowDefinition is derived from DependencyObject directly. The MSDN document shows Silverlight documentation by default and misdirected me to the older and incorrect approach.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With