Questions tagged [multibinding]

MultiBinding is a collection of Binding objects attached to a single binding target property.

MultiBinding is a collection of Binding objects attached to a single binding target property. How the data is combined is determined by the Convert() function of an implementation of IMultiValueConverter, which must be specified in the MultiBinding.

MultiBinding cannot be used with PriorityBinding.

For more information, see the MSDN documentation for the MultiBinding class

396 questions
257
votes
4 answers

How to bind multiple values to a single WPF TextBlock?

I'm currently using the TextBlock below to bind the value of a property named Name: Now, I want to bind another property named ID to the same TextBlock. Is it possible to bind two or more values to the same…
Spen D
  • 4,225
  • 9
  • 39
  • 47
118
votes
4 answers

How can I pass a constant value for 1 binding in multi-binding?

I have a multi-binding like
Nam G VU
  • 33,193
  • 69
  • 233
  • 372
60
votes
3 answers

StringFormat and Multibinding with Label

I would like to use StringFormat to do someting like this :
Filimindji
  • 1,453
  • 1
  • 16
  • 23
39
votes
2 answers

MultiDataTrigger vs DataTrigger with multibinding

I encountered a situation where I can easily achieve the same functionality by using a MultiDataTrigger or, alternately, using a DataTrigger with a MultiBinding. Are there any substantive reasons to prefer one approach over the other? With…
mcwyrm
  • 1,571
  • 1
  • 15
  • 27
34
votes
1 answer

String format using MultiBinding?

I'm trying to display a string in XAML using Label control. Following is my XAML code :
25
votes
4 answers

putting multibinding on a single line in xaml

Is there a way to take this multibinding:
Adam S
  • 8,945
  • 17
  • 67
  • 103
24
votes
7 answers

Nested MultiBinding(s)

I've been playing around with WPF for quite a while now, but for the first time today, I needed to nest a MultiBinding inside another, something like:
Louis Kottmann
  • 16,268
  • 4
  • 64
  • 88
15
votes
5 answers

WPF MultiBinding in Convertor fails ==> DependencyProperty.UnsetValue

My code fails at at startup because the values array in the Converter that is called by the Multibinding is not filled with proper value but have a value of DependencyProperty.UnsetValue. have a look at Convertor and also see where i getting…
Aryan SuryaWansi
  • 2,691
  • 10
  • 31
  • 33
15
votes
1 answer

How to update multibinding manually

I had a problem with the Binding. The Rectangle.Fill dependency property was bound to an ObservableCollection with the converter. Although the ObservableCollection implements INotifyCollectionChanged, the binding was not updated. I managed, however,…
Spook
  • 25,318
  • 18
  • 90
  • 167
15
votes
5 answers

Let WPF Tabcontrol height assume height of largest item?

Is there any way to have to tabcontrol take the size of the largest tab item (well, actually, the tabitem's content)? Since the tabcontrol has no specific size assigned it should autosize: it does that correctly, but when you switch tabs it…
Inferis
  • 4,582
  • 5
  • 37
  • 47
13
votes
1 answer

Text on TextBox with UpdateSourceTrigger=PropertyChanged is not updated when coercion of text input results in unchanged source value

I have a text box whose Text property has a TwoWay MultiBinding with UpdateSourceTrigger set to PropertyChanged. The first Binding is to a dependency property (Value) which has a PropertyChangedCallBack function that rounds the value to one decimal…
Neo
  • 4,145
  • 6
  • 53
  • 76
12
votes
1 answer

Issue while mixing MultiBinding converter and Trigger in style

Setting the style in (assuming the converter returns the color Red)