Generic boolean value converter for WPF
When implementing user interfaces with WPF and using databinding you often need to show something differently based on boolean value in your view model. Here is a clever converter to help you.
Sample usage
<GenericBooleanConverter x:Key="booleanToVisibility" TrueValue="Visible" FalseValue="Collapsed" />
<GenericBooleanConverter x:Key="boolToOrientation" TrueValue="Vertical" FalseValue="Horizontal" />
<StackPanel
Orientation="{Binding IsMyViewModelVertical, Converter={StaticResource booleanToOrientation}}"
Visibility="{Binding IsMyViewModelVisible, Converter={StaticResource booleanToVisibility}}">
<Label>I am a label that is sometimes visible</Label>
<Label>I am a label that is sometimes to the left and sometimes below the previous label</Label>
</StackPanel>