6

I want to bind one property to multiple sources. My reason for this are things like this:

midpoint=point2.X - point1.X; //depends on two sources!

How could this be realised? As far as I know it's not directly possible out-of-the-box?

1 Answer 1

7

I believe what you are looking for is a MultiBinding.

From the MSDN documentation:

<TextBlock Name="textBox2" DataContext="{StaticResource NameListData}">
  <TextBlock.Text>
    <MultiBinding Converter="{StaticResource myNameConverter}"
                  ConverterParameter="FormatLastFirst">
      <Binding Path="FirstName"/>
      <Binding Path="LastName"/>
    </MultiBinding>
  </TextBlock.Text>
</TextBlock>
1
  • thank you very much, exactly what i was looking for. i obviously used the wrong search terms. Apr 14, 2010 at 14:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.