MVVMbasics Logo

mobilemotion.eu Logo


Back to Class Reference home page


MVVMbasics.Converters
Class ColorToBrushConverter

Windows.UI.Xaml.Data.IValueConverter | System.Windows.Data.IValueConverter
  implemented by MVVMbasics.Converters.ColorToBrushConverter
 

 
public class ColorToBrushConverter : Windows.UI.Xaml.Data.IValueConverter | System.Windows.Data.IValueConverter

Converter class that converts Color values to objects of type SolidColorBrush to be directly used in XAML.


Method Summary
object  Convert(object value, Type targetType, object parameter, ...)
Converts a Color value to an object of type SolidColorBrush.
object  ConvertBack(object value, Type targetType, object parameter, ...
Converts a SolidColorBrush object to a Color value, by retrieving the brushes color.
 
Method Detail

Convert

public object Convert(object value, Type targetType, object parameter, ...)

Converts a Color value to an object of type SolidColorBrush.

Parameters:

value - Color input value
targetType - (not used)
parameter - (not used)

Returns:

SolidColorBrush containing the given Color value


ConvertBack

public object ConvertBack(object value, Type targetType, object parameter, ...)

Converts a SolidColorBrush object to a Color value, by retrieving the brushes color.

Parameters:

value - SolidColorBrush input object
targetType - (not used)
parameter - (not used)

Returns:

Color value representig the given brush