IUniversalConverter en - Leksiqq/WpfMarkupExtension GitHub Wiki

Attention! This article, as well as this announcement, are automatically translated from Russian.

IUniversalConverter interface

Implements the System.Windows.Data.IValueConverter and System.Windows.Data.IMultiValueConverter interfaces and defines new generic methods for forward and backward conversion.

Methods

object? Convert(object?[]? values, Type targetType, object?[] parameters, CultureInfo? culture, bool multi);

object? ConvertBack(object? value, Type[] targetTypes, object?[] parameters, CultureInfo? culture, bool multi);

public static object?[] SplitParameter(object? parameter) - converts the argument to an array according to the following algorithm.

  • If the argument is an array, returns the corresponding array,
  • otherwise, if the argument is a string, returns a split of that string, using the character '|' as the delimiter,
  • otherwise, returns an array with the argument as the only element.

Before: (BindingProxyMarkup) Start: (Overview) Next: (DataSwitch)