Top "Dependency-properties" questions

A property in WPF and Silverlight that can be set through methods such as, styling, data binding, animation, and inheritance.

Listen to DependencyProperty changed event and get the old value

I have the following code to subscribe to property changed event for VisiblePosition property of Column class: DependencyPropertyDescriptor dpd = DependencyPropertyDescriptor.…

wpf dependency-properties
Is there a way to specify a custom dependency property's default binding mode and update trigger?

I would like to make it so that, as default, when I bind to one of my dependency properties the …

c# data-binding dependency-properties
'{DependencyProperty.UnsetValue}' is not a valid value for property 'FocusVisualStyle'

I have a weird error I'm trying to debug with no luck. I have subclassed hwndhost showing some content, I …

wpf dependency-properties hwndhost
How is WPF's DependencyObject implemented?

Are there any articles that describe how the DependencyObject class in WPF works "under the hood"? Specifically, I'm curious about …

c# wpf dependency-properties dependencyobject
Setters not run on Dependency Properties?

Just a short question, to clarify some doubts. Are setters not run when an element is bound to a dependency …

wpf dependency-properties setter
ObservableCollection dependency property does not update when item in collection is deleted

I have a attached property of type ObservableCollection on a control. If I add or remove items from the collection, …

wpf dependency-properties observablecollection
WPF ValidationRule with dependency property

Suppose you have a class inheriting from ValidationRule: public class MyValidationRule : ValidationRule { public string ValidationType { get; set; } public override ValidationResult …

wpf validation dependency-properties
WPF usercontrol Twoway binding Dependency Property

I created a Dependency Property in the usercontrol, but however changes in the usercontrol was NOT notified to the Viewmodel …

c# wpf user-controls dependency-properties
When to use a WPF Dependency Property versus INotifyPropertyChanged

Do folks have any guidance on when a simple .NET property that fires INotifyPropertyChanged.PropertyChanged is sufficient in a view …

wpf binding dependency-properties inotifypropertychanged