IMultiValueConverter 接口

定义

提供在 MultiBinding 中应用自定义逻辑的方法。Provides a way to apply custom logic in a MultiBinding.

public interface class IMultiValueConverter
public interface IMultiValueConverter
type IMultiValueConverter = interface
Public Interface IMultiValueConverter
派生

注解

若要将转换器与相关联 MultiBinding ,请创建一个实现接口的类 IMultiValueConverter ,然后实现 ConvertConvertBack 方法。To associate a converter with a MultiBinding, create a class that implements the IMultiValueConverter interface, and then implement the Convert and ConvertBack methods.

集合中的各个绑定可以具有其自己的值转换器。Individual bindings in the collection can have their own value converters. 有关详细信息,请参阅 IValueConverterFor more information, see IValueConverter.

方法

Convert(Object[], Type, Object, CultureInfo)

将源值转换为绑定目标的值。Converts source values to a value for the binding target. 数据绑定引擎在将该值从源绑定传播到绑定目标时会调用此方法。The data binding engine calls this method when it propagates the values from source bindings to the binding target.

ConvertBack(Object, Type[], Object, CultureInfo)

将绑定目标值转换为源绑定值。Converts a binding target value to the source binding values.

适用于