New to Telerik UI for WinForms? Start a free 30-day trial

Defines conversions between binding-source values and values displayed or stored by a binding target.

Definition

Namespace:Telerik.WinControls.UI

Assembly:Telerik.WinControls.RadMap.dll

Syntax:

C#
public interface IValueConverter

Methods

Converts a binding-source value to a value suitable for the binding target.

C#
object Convert(object value, Type targetType, object parameter, CultureInfo culture)
Parameters:valueobject

The value produced by the binding source.

targetTypeType

The type of the binding target property.

parameterobject

Converter-specific configuration.

cultureCultureInfo

The culture to use when converting or formatting the value.

Returns:

object

The converted value for the binding target; if this method returns null, the binding uses the valid null value.

Converts a binding-target value to a value suitable for the binding source.

C#
object ConvertBack(object value, Type targetType, object parameter, CultureInfo culture)
Parameters:valueobject

The value produced by the binding target.

targetTypeType

The type expected by the binding source.

parameterobject

Converter-specific configuration.

cultureCultureInfo

The culture to use when converting or parsing the value.

Returns:

object

The converted value for the binding source; if this method returns null, the binding uses the valid null value.