Table of Contents

Class GenericConverter<TInput, TOutput, TParameter>

Namespace
Acuit.Pinpoint.Windows
Assembly
Acuit.Pinpoint.Windows.dll

A helper base class for value converters.

public abstract class GenericConverter<TInput, TOutput, TParameter> : ValidationRule, IValueConverter

Type Parameters

TInput

The type of the binding source.

TOutput

The type of the binding target.

TParameter

The type of the converter parameter.

Inheritance
GenericConverter<TInput, TOutput, TParameter>
Implements
Derived
Inherited Members

Methods

Convert(object, Type, object, CultureInfo)

Converts a value.

public object Convert(object value, Type targetType, object parameter, CultureInfo culture)

Parameters

value object

The value produced by the binding source.

targetType Type

The type of the binding target property.

parameter object

The converter parameter to use.

culture CultureInfo

The culture to use in the converter.

Returns

object

A converted value. If the method returns null, the valid null value is used.

Convert(TInput, TParameter, CultureInfo)

When overridden in a derived class, converts a value.

public abstract TOutput Convert(TInput value, TParameter parameter, CultureInfo culture)

Parameters

value TInput

The value produced by the binding source.

parameter TParameter

The converter parameter to use.

culture CultureInfo

The culture to use in the converter.

Returns

TOutput

A converted value. If the method returns null, the valid null value is used.

ConvertBack(object, Type, object, CultureInfo)

Converts a value.

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

Parameters

value object

The value that is produced by the binding target.

targetType Type

The type to convert to.

parameter object

The converter parameter to use.

culture CultureInfo

The culture to use in the converter.

Returns

object

A converted value. If the method returns null, the valid null value is used.

ConvertBack(TOutput, TParameter, CultureInfo)

When overridden in a derived class, converts a value.

public abstract TInput ConvertBack(TOutput value, TParameter parameter, CultureInfo culture)

Parameters

value TOutput

The value that is produced by the binding target.

parameter TParameter

The converter parameter to use.

culture CultureInfo

The culture to use in the converter.

Returns

TInput

A converted value. If the method returns null, the valid null value is used.

Validate(object, CultureInfo)

Performs validation checks on a value.

public override ValidationResult Validate(object value, CultureInfo cultureInfo)

Parameters

value object

The value from the binding target to check.

cultureInfo CultureInfo

The culture to use in this rule.

Returns

ValidationResult

A ValidationResult object.