I have a binding to an unknown source. All that I have is a must. I have no other way to look at a related object. I need to figure out the Type for the linked object, even if the value is null (this is my problem).
I evaluated binding by binding to an object, and then used the object as a way to get the type, but I need to know the type, even if the value is null.
For example, I have a class:
public class Customer{
public string Name { get; set; }
public int Age { get; set; }
}
Now, if I have a WPF control for any of these properties (let's say they are dependency properties), I would like to get the type of the property, even if the value is null.
So, I have a custom control that now has a Binding object that represents {Binding Name}, for example. How can I get the type of “linked object” using C #?
source
share