I have a model with a DateTime? field.
If I assign this to be a column in a Data Grid, the full date is shown. In order to only show the short date, I can use the FormatString property of the column.
Now, I want to display a Badge (control) next to the date if the date is < DateTime.Now.
My idea was to create a Template for the column with a Label and a Badge control. The Text property of the Label should show the short date and the Visible property of the Badge is bound to my expression that checks if the date is < DateTime.Now.
My problem is that I cannot assign the Text property of the label with the DateTime? object, even if I use ToString() or String.Format().
How can I create such a template that shows the date as well as the badge?