How to determine whether a dependency object implements a given dependency property (C# / WPF)
- by Tim Coulter
I am working with the classes in the System.Windows.Documents namespace, trying to write some generic code that will conditionally set the value of certain dependency properties, depending on whether these properties exist on a given class.
For example, the following method assigns an arbitrary value to the Padding property of the passed…