C# Class Microsoft.Silverlight.Testing.Client.VisibilityConverter

A value converter for collapsing or showing elements.
Inheritance: IValueConverter
Mostrar archivo Open project: garyjohnson/wpnest

Public Methods

Method Description
Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object

Convert a boolean value to a Visibility value.

ConvertBack ( object value, Type targetType, object parameter, System culture ) : object

Support two-way databinding of the VisibilityConverter, converting Visibility to a bool.

Private Methods

Method Description
GetVisibilityMode ( object parameter ) : Visibility

Determine the visibility mode based on a converter parameter. This parameter is of type Visibility,and specifies what visibility value to return when the boolean value is true.

IsVisibilityInverted ( object parameter ) : bool

Determine whether or not visibility is inverted based on a converter parameter. When the parameter is specified as Collapsed, that means that when the boolean value is true, we should return Collapsed, which is inverted.

Method Details

Convert() public method

Convert a boolean value to a Visibility value.
public Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object The value instance.
targetType System.Type The target parameter.
parameter object ConverterParameter is of type Visibility.
culture System.Globalization.CultureInfo The culture parameter.
return object

ConvertBack() public method

Support two-way databinding of the VisibilityConverter, converting Visibility to a bool.
public ConvertBack ( object value, Type targetType, object parameter, System culture ) : object
value object The value instance.
targetType System.Type The target parameter.
parameter object ConverterParameter is of type Visibility.
culture System The culture parameter.
return object