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> 
Sign up to request clarification or add additional context in comments.

1 Comment

thank you very much, exactly what i was looking for. i obviously used the wrong search terms.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.