views:

57

answers:

1

Suppose I have this MultiBinding:

<MultiBinding Converter="{StaticResource FooBarConverter}>
  <Binding Path="Foo" Converter="{StaticResource FooConverter}" />
  <Binding Path="Bar" Converter="{StaticResource BarConverter}" />
</MultiBinding>

This doesn't seem to work: the values array passed to FooBarConverter contains DependencyProperty.UnsetValue for each value (two, in this case). Removing the converters on the child bindings (FooConverter and BarConverter) gives me the actual values. By the way: those converters are properly invoked, it just looks like their result is discarded.

Is this intended behavior? I want to bind 2 properties by I need to convert at least one of them before throwing them into the MultiValueConverter...

A: 

you have mention converter in the Multibinding tag like this

<TextBlock Grid.Row="3" Grid.Column="1" Padding="5">
    <TextBlock.Text>
      <MultiBinding Converter="{StaticResource sumConverter}">
        <Binding  Path="FirstNum" />
        <Binding  Path="SecondNum" />
        <Binding   Path="ThirdNum" />
      </MultiBinding>
    </TextBlock.Text>
  </TextBlock>
Kishore Kumar
It's there. That one works. It's the converters on the child Bindings that I'm talking about.
Inferis
i have gone through this link http://social.msdn.microsoft.com/forums/en-US/wpf/thread/af4a19b4-6617-4a25-9a61-ee47f4b67e3b they are saying they have the same probelm may be it is a bug.
Kishore Kumar
Would you mind reposting that in a seperate answer so I can check it off?
Inferis