Skip to main content
All docs
V26.1
  • DelegateConverterFactory.CreateValueConverter<TIn, TOut>(Func<TIn, TOut>, Func<TOut, TIn>) Method

    Creates an instance of an object that implements the IValueConverter interface.

    Namespace: DevExpress.Mvvm.UI

    Assembly: DevExpress.Xpf.Core.v26.1.dll

    NuGet Package: DevExpress.Wpf.Core

    Declaration

    public static IValueConverter CreateValueConverter<TIn, TOut>(
        Func<TIn, TOut> convert,
        Func<TOut, TIn> convertBack = null
    )

    Parameters

    Name Type Description
    convert Func<TIn, TOut>

    A delegate method that converts a value.

    Optional Parameters

    Name Type Default Description
    convertBack Func<TOut, TIn> null

    A delegate method that converts a value back.

    Type Parameters

    Name Description
    TIn

    The type of the value produced by the binding source.

    TOut

    The type of the value of the binding target.

    Returns

    Type Description
    IValueConverter

    An instance of an object that implements the IValueConverter interface.

    See Also