[]
        
(Showing Draft Content)

C1.WinUI.Core.DelegateConverter.Create

Create Method

Create(Func<object, Type, object, string, object>)

Creates the specified converter function.

Declaration
public static IValueConverter Create(Func<object, Type, object, string, object> converterFunction)
Parameters
Type Name Description
Func<object, Type, object, string, object> converterFunction

The converter function. (value, type, parameter, culture)

Returns
Type Description
IValueConverter

The converted value

Examples
var converter = DelegateConverter.Create((value, type, parameter, culture)=>
{
    return; //Put the converter code here
});

Create(Func<object, Type, object, string, object>, Func<object, Type, object, string, object>)

Creates the specified converter function.

Declaration
public static IValueConverter Create(Func<object, Type, object, string, object> converterFunction, Func<object, Type, object, string, object> converterBackFunction)
Parameters
Type Name Description
Func<object, Type, object, string, object> converterFunction

The converter function. (value, type, parameter, culture)

Func<object, Type, object, string, object> converterBackFunction

The convert back function. (value, type, parameter, culture)

Returns
Type Description
IValueConverter

The converted value

Examples
var converter = DelegateConverter.Create((value, type, parameter, culture)=>
{
    return; //Put the converter code here
});

Create(Func<object, object>)

Creates the specified converter function.

Declaration
public static IValueConverter Create(Func<object, object> converterFunction)
Parameters
Type Name Description
Func<object, object> converterFunction

The converter function.

Returns
Type Description
IValueConverter

The converted value

Examples
var converter = DelegateConverter.Create((value)=>
{
    return; //Put the converter code here
});