Skip to content
This repository has been archived by the owner on Aug 27, 2020. It is now read-only.

NotBooleanConverter

Mark Smith edited this page Aug 29, 2016 · 1 revision

NotBooleanConverter

This value converter takes a boolean as input and returns the inverse (true -> false and false -> true).

It can be declared inline with a binding as a markup extension, or in resources to be shared.

Example

<Label Text="You see me" x:Name="firstLabel" />
<Label Text="Or me." 
       IsVisible="{Binding IsVisible, 
               Source={x:Reference firstLabel}, 
               Converter={cvt:NotBooleanConverter}}" />