Table of Contents

Class ValueConverterGroup

Namespace
WindowSill.API
Assembly
WindowSill.API.dll

A value converter that applies multiple converters in sequence, passing the result of each converter as input to the next converter in the chain.

public class ValueConverterGroup : List<IValueConverter>, IList<IValueConverter>, ICollection<IValueConverter>, IReadOnlyList<IValueConverter>, IReadOnlyCollection<IValueConverter>, IEnumerable<IValueConverter>, IList, ICollection, IEnumerable, IValueConverter
Inheritance
ValueConverterGroup
Implements
Inherited Members
Extension Methods

Remarks

Usage example:

<Binding Path="PreviewFlyoutContent" RelativeSource="{RelativeSource TemplatedParent}">
    <Binding.Converter>
        <local:ValueConverterGroup>
            <local:NullToBooleanConverter/>
            <converters:BoolNegationConverter/>
        </local:ValueConverterGroup>
    </Binding.Converter>
    <Binding.ConverterParameter>
        <local:ValueConverterGroupParameters>
            <x:Null/>
        </local:ValueConverterGroupParameters>
    </Binding.ConverterParameter>
</Binding>

Methods

Convert(object, Type, object, string)

Converts a value by applying each converter in the group sequentially.

public object Convert(object value, Type targetType, object parameter, string language)

Parameters

value object

The value produced by the binding source.

targetType Type

The type of the binding target property.

parameter object

The converter parameter to use. Must be null or a ValueConverterGroupParameters instance.

language string

The culture to use in the converter.

Returns

object

The converted value after applying all converters in sequence.

Exceptions

ArgumentException

Thrown when the parameter is not null or a ValueConverterGroupParameters instance.

ConvertBack(object, Type, object, string)

Converts a value back by applying the converters in reverse order. Currently not implemented.

public object ConvertBack(object value, Type targetType, object parameter, string language)

Parameters

value object

The value that is produced by the binding target.

targetType Type

The type to convert to.

parameter object

The converter parameter to use.

language string

The culture to use in the converter.

Returns

object

A converted value.

Exceptions

NotImplementedException

This method is not currently implemented.