Class ColorToBrushConverter
Represents the class for color to brush converter.
Inheritance
Implements
Inherited Members
Namespace: Syncfusion.Windows.Tools.Controls
Assembly: Syncfusion.Tools.Wpf.dll
Syntax
public class ColorToBrushConverter : IValueConverter
Constructors
ColorToBrushConverter()
Declaration
public ColorToBrushConverter()
Methods
Convert(Object, Type, Object, CultureInfo)
Converts a System.Windows.Media.Color value to a System.Windows.Media.SolidColorBrush.
Declaration
public object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | value | The value to convert. Expected to be of type System.Windows.Media.Color. |
| System.Type | targetType | The target type of the binding (typically System.Windows.Media.Brush). |
| System.Object | parameter | An optional parameter (not used). |
| System.Globalization.CultureInfo | culture | The culture information for the conversion. |
Returns
| Type | Description |
|---|---|
| System.Object | A System.Windows.Media.SolidColorBrush created from the specified System.Windows.Media.Color. |
Exceptions
| Type | Condition |
|---|---|
| System.ArgumentException | Thrown if the value is not of type System.Windows.Media.Color. |
ConvertBack(Object, Type, Object, CultureInfo)
Not implemented. This converter does not support converting back from System.Windows.Media.Brush to System.Windows.Media.Color.
Declaration
public object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | value | The value produced by the binding target. |
| System.Type | targetType | The type to convert to. |
| System.Object | parameter | An optional parameter. |
| System.Globalization.CultureInfo | culture | The culture information for the conversion. |
Returns
| Type | Description |
|---|---|
| System.Object | Always returns |