WPF: Display a bool value as “Yes” / “No”

You can also use this great value converter

Then you declare in XAML something like this:

<local:BoolToStringConverter x:Key="BooleanToStringConverter" FalseValue="No" TrueValue="Yes" />

And you can use it like this:

<TextBlock Text="{Binding Path=MyBoolValue, Converter={StaticResource BooleanToStringConverter}}" />

Leave a Comment