MaximumContrastConverter.Convert Method

Definition

Overloads

Convert(Object, Type, Object, CultureInfo)

Converts value to a Color or Brush.

Convert(Object[], Type, Object, CultureInfo)

Converts values to a Color or Brush.

Convert(Object, Type, Object, CultureInfo)

Converts value to a Color or Brush.

public object Convert (object value, Type targetType, object parameter, System.Globalization.CultureInfo culture);
abstract member Convert : obj * Type * obj * System.Globalization.CultureInfo -> obj
override this.Convert : obj * Type * obj * System.Globalization.CultureInfo -> obj
Public Function Convert (value As Object, targetType As Type, parameter As Object, culture As CultureInfo) As Object

Parameters

value
Object

The value to convert. It can be one of the following types:

    targetType
    Type

    The output type requested (Color or Brush

    parameter
    Object

    [Optional] An opacity value in the range [0.0..1.0]. The returned value has this opacity applied to it.

    culture
    CultureInfo

    The culture

    Returns

    A white or black Color or Brush, depending on which contrasts more with value.

    Implements

    Applies to

    Convert(Object[], Type, Object, CultureInfo)

    Converts values to a Color or Brush.

    public object Convert (object[] values, Type targetType, object parameter, System.Globalization.CultureInfo culture);
    abstract member Convert : obj[] * Type * obj * System.Globalization.CultureInfo -> obj
    override this.Convert : obj[] * Type * obj * System.Globalization.CultureInfo -> obj
    Public Function Convert (values As Object(), targetType As Type, parameter As Object, culture As CultureInfo) As Object

    Parameters

    values
    Object[]

    The three values to convert. The values are specified in the following order:

      Each of the values can be one of the following types:
        targetType
        Type

        The output type requested (Color or Brush

        parameter
        Object

        [Optional] An opacity value in the range [0.0..1.0]. The returned value has this opacity applied to it.

        culture
        CultureInfo

        The culture

        Returns

        A white or black Color or Brush, depending on which contrasts more with values[0].

        Implements

        Applies to