Share via


DefaultStringConverter.Convert(Object[], Type, Object, CultureInfo) Method

Definition

Converts the value of the single Binding in the IMultiValueConverter to a string, and returns that string if not null/empty, otherwise returns DefaultValue.

public:
 virtual System::Object ^ Convert(cli::array <System::Object ^> ^ values, Type ^ targetType, System::Object ^ parameter, System::Globalization::CultureInfo ^ culture);
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[]

Must contain exactly one value, of any type.

targetType
Type

The parameter is not used.

parameter
Object

The parameter is not used.

culture
CultureInfo

The parameter is not used.

Returns

A string, either the value of the first Binding converted to string, or DefaultValue.

Implements

Remarks

Note that the MultiBinding which uses this IMultiValueConverter must have exactly one Binding.

Applies to