This documentation is archived and is not being maintained.

BooleanToVisibilityConverter Class

Updated: February 2010

Represents the converter that converts Boolean values to and from Visibility enumeration values.

Namespace:  System.Windows.Controls
Assembly:  PresentationFramework (in PresentationFramework.dll)

public sealed class BooleanToVisibilityConverter : IValueConverter
<BooleanToVisibilityConverter .../>

Use the BooleanToVisibilityConverter class to convert a Boolean to and from a Visibility value. The Convert method returns Visibility.Visible when true is passed in or Visibility.Collapsed when false is passed in. Note that the Visibility.Collapsed value hides the control and does not reserve space for it in a layout. When you call the ConvertBack method and specify a reference to an object, it returns true if the object is Visible; otherwise, it returns false.


Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Windows 7, Windows Vista, Windows XP SP2, Windows Server 2008 R2, Windows Server 2008, Windows Server 2003

The .NET Framework and .NET Compact Framework do not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

.NET Framework

Supported in: 3.5, 3.0




February 2010

Added a remark to explain the class methods.

Customer feedback.