Multiple Connectivity as a Resource in XAML

Is it possible (if yes, how) to add a multi-valued resource binding .

I have a multivariate binding that takes 2 separate bindings and a converter parameter in one of these bindings.

I have to use this binding to 5 different elements, and those anchor tags differ only in the converter parameter. The rest is the same.

I would avoid repeating multi-block table tags.

+5
source share
1 answer

Easy way to see if something is working: TRY IT!

    <Style TargetType="Button">
        <Setter Property="Content">
            <Setter.Value>
                <MultiBinding Converter="{StaticResource OmgLolzConverter}">
                    <Binding Path="One" Converter="{StaticResource CakeConverter}"/>
                    <Binding Path="Two" Converter="{StaticResource CakeConverter}"/>
                </MultiBinding>
            </Setter.Value>
        </Setter>
    </Style>

It works great.

+4
source

All Articles