C# Class MyConverters.BoolToColorBrushConverter

Inheritance: IValueConverter
Mostrar archivo Open project: shendongnian/code

Public Methods

Method Description
ColorFromName ( string colorName ) : Color
Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object

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

Method Details

ColorFromName() public static method

public static ColorFromName ( string colorName ) : Color
colorName string
return Color

Convert() public method

public Convert ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object Bolean value controlling wether to apply color change
targetType Type
parameter object A CSV string on the format [ColorNameIfTrue;ColorNameIfFalse;OpacityNumber] may be provided for customization, default is [LimeGreen;Transperent;1.0].
culture CultureInfo
return object

ConvertBack() public method

public ConvertBack ( object value, Type targetType, object parameter, CultureInfo culture ) : object
value object
targetType Type
parameter object
culture CultureInfo
return object