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

A converter for modifying the font weight based on a parameter.
Inheritance: IValueConverter
Mostra file Open project: garyjohnson/wpnest

Public Methods

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

Convert a boolean value to a FontWeight value.

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

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

Private Methods

Method Description
GetFontWeightMode ( object parameter ) : System.Windows.FontWeight

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.

IsFontWeightInverted ( object parameter ) : bool

Determine whether or not weight is inverted based on a converter parameter.

Method Details

Convert() public method

Convert a boolean value to a FontWeight value.
public Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object The value object.
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 2-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 object.
targetType System.Type The target parameter.
parameter object ConverterParameter is of type Visibility.
culture System The culture parameter.
return object