I have a class
public class Car
{
[Description("name of the car")]
public string Name { get; set; }
[Description("age of the car")]
public int Age { get; set; }
}
Is there any possibility to bind Description attribute to Label content. The solution what I’m looking for shouldn’t require to instantiate Car object.
It won’t be a proper binding (which is not necessary for static data anyway) but you can easily create a
MarkupExtensionto retrieve it, just pass the type and the property name and get it via reflection.Outline would be something like: