Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

Null data message with binding

$
0
0

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 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>