I have this C# object ( Current, Monitor.CarNumber value is 123456 )
public class Monitor
{
[Display(Name = "This is car number")]
public string CardNumber { get; set; }
}
And in WPF, An Label control display Monitor.CardNumber
<Label Content={Binding CardNumber} />
( When I run the program. it display 123567, It work correctly ).
Now I don't want it display the CardNumber's value, I want it display the "This is car number" ( the Data Annotation of CardNumber Property ).
How should I do that ? ( No C# code, only modify above XML code )