NullOrEmptyBooleanConverter - markjulmar/xamu-infrastructure GitHub Wiki
NullOrEmptyBooleanConverter
This value converter takes an input object or string and returns a boolean value based on whether the input is null/empty.
This can be used inline with a binding, or if you want to reuse the object, you can place it into a resource dictionary.
Properties
Empty: the boolean value to return if the input is null/empty. Defaults to `false'.NotEmpty: the boolean value to return if the input has a value. Defaults to `true'.
Example
<Entry x:Name="nameEntry" Text="{Binding Name, Mode=TwoWay}" />
<Label TextColor="Red" Text="You must supply a name"
IsVisible="{Binding Name,
Converter={cvt:NullOrEmptyBooleanConverter Empty=true, NotEmpty=false}}" />