WPF: Determining if an inherited property is set on an object or is inherited.
Internal email that may be helpful, read from the bottom to the top…
From: Helpful Person
It sounds like you want to use DependencyPropertyHelper.GetValueSource().
Pass it your DependencyObject and the DependencyProperty you want to inspect, and it will return you a ValueSource.
Next look at the BaseValueSource property of the result. If the property was set directly the value will be “Local”, if it was inherited from a parent it will say “Inherited”.
From: WPF App Coder
Subject: Identifying the source of a property?
I need to determine whether a particular property was set for an object or whether the object inherits it from its parent. E.g. DataContext property, once set for a Panel, will be the same on all children contained by the panel. I would like to know that it was defined for the Panel. Is there a way to do it?