WPF Personal FAQs

di Luigi Boschetti


BoolToVisibility converter is a standard converter that allows to convert a boolean value to a Visibility value for WPF controls. To use it:

In a UserControl/Window xaml file:

  1. In the Resources, declare the Converter:
    <BooleanToVisibilityConverter x:Key="BoolToVisibilityConverter"/>

2. Use the converter in Binding instruction:

<UserControl Visibility="{Binding boolValue, Converter={StaticResource BoolToVisibilityConverter}}"/>