Quantcast
Viewing all articles
Browse latest Browse all 91519

Null data message with binding

I am binding a label to a nullable DateTime property. I want to display "-" if the property is null.
Does anyone have a suggestion for supplying a Null Text option?

Here is the property and XAML I am using:

public DateTime? StartDate { get; set; }
Label FontSize="Large" Text="{Binding StartDate, StringFormat='{0:dd/MM/yyyy}'}"

Thanks!
Wes


Viewing all articles
Browse latest Browse all 91519

Trending Articles