Questions tagged [imultivalueconverter]

IMultiValueConverter is an interface defined in Microsoft .NET WPF and used with MultiBinding data binding. Implementors of the interface have the opportunity to compose or convert items from multiple input collections into a single output collection.

The Microsoft .NET WPF MultiBinding object requires that you provide an IMultiValueConverter implementation when specifying multiple input collections in the MultiBinding object. The multivalue converter's job is to decide how to combine the elements from the multiple input collections. The IMultiValueConverter implementation can also filter elements, returning only a subset of the items found in the input collections.

For more details, see the MSDN documentation for IMultiValueConverter

133 questions
2
votes
2 answers

WPF Repeat password IMultiValueConverter

I want to have a PasswordBox and another PasswordBox to repeat the chosen password and a submit button. This is what i got: WPF:
JaFu0815
  • 75
  • 1
  • 6
2
votes
0 answers

WPF multivalue converter not being called

I have a data grid whose width is initialized to the width of the row that it is in in the parent grid. The columns don't fill all of the empty space in the grid, what I want is for each column to have an equal width. A coworker of mine set the…
2
votes
3 answers

How to get in ConvertBack parameters from Convert?

The problem: I am using MultiBinding with converter to pass (x,y) coordinates into method. And I can't make it working in back direction: public class MyConverter : IMultiValueConverter { public object Convert(object[] values, Type targetType,…
Sinatr
  • 20,892
  • 15
  • 90
  • 319
2
votes
1 answer

Cannot bind DataGrid ItemsSource with multibinding - simple binding works fine

I'm facing a weird issue. I have a DataGrid that I want to bind to ItemsSource with MultiBinding for a reason. While using simple binding to a DataTable works well, I cannot get this to work with multibinding. Simply put: the markup below works and…
patryk
  • 651
  • 12
  • 30
2
votes
1 answer

WPF Multibinding: OneWayToSource binding from TextBox updated via another binding doesnt work?

I have a DataGrid bound to the People collection. Also I have a TextBox that should accept the Name value from the selected row. User can then edit the value or can leave it as is. The key point is: the text shown in the TextBox no matter whether it…
Alex Zhmerik
  • 365
  • 1
  • 10
2
votes
1 answer

Can't access datacontext in multivalueconverter

I have a usercontrol which I need to set a specific DataContext on. The usercontrol uses multivalueconverters. However, the binding in multivalueconverter fails to use the datacontext. It works fine for regular value converters. Anyone know what is…
Wallstreet Programmer
  • 9,567
  • 3
  • 37
  • 52
2
votes
1 answer

Multibinding Multiselection ListView

OK I have a weird one here. What I am trying to figure out is how to have one listview, populated by an ObservableCollection, update another ListView, populated by another ObservableCollection, based on the first listview's selection and then use a…
2
votes
2 answers

MultivalueConverter not called after DragDrop

I have a IMultivalueConverter which updates the background color of a StackPanel when PropertyA or PropertyB is changed. These Controls are created dynamically. Problem: I have added two StackPanels and changed the PropertyA in the code when a…
2
votes
1 answer

Set element Background based on value returned by MultiValueConverter - How do do it?

I designed a battery level indicator consisting of a Border inside another Border. The Width of inner Border is Multi-Bound to the outer Border ActualWidth and the battery value itself (from DataContext, ranging from 0.0 to 1.0):
heltonbiker
  • 26,657
  • 28
  • 137
  • 252
2
votes
1 answer

Why does my IMultiBindingConverter get an array of strings when used to set TextBox.Text?

I'm trying to use a MultiBinding with a converter where the child elements also have a converter. The XAML looks like so:
2
votes
2 answers

Attached Property not triggering IMultiValueConverter

Below is my DataGrid with some attached properties that are associated with the popup controls further down. The ComboBox is populated by an enum.
Hank
  • 2,456
  • 3
  • 35
  • 83
2
votes
1 answer

MultiBinding ConvertBack issue

In trying to solve an issue Im having in another project - Ive created the following example to replicate the issue. The idea is that when the user enters new values, via the slider or textbox, those values should then be "ConvertedBack" via the…
wforl
  • 843
  • 10
  • 22
2
votes
1 answer

DependencyProperty.UnsetValue appears when using a IMultiValueConverter

I created a simple Converter to concatenate the text of four TextBoxes in my WPF app. Here is the Converter: public class FourString:IMultiValueConverter { public object Convert(object[] values, Type targetType, object parameter, CultureInfo…
JayJay
  • 1,038
  • 3
  • 25
  • 50
1
vote
1 answer

Two way Multiconverter or Converter with property

I need to convert a two part value into a string and back again for example: {Value = 12.0, Units = DimensionUnits.Inches} Converts to "12 in" This is pretty simple using a multivalue converter to convert from source but becomes impossible to…
NtscCobalt
  • 1,639
  • 2
  • 15
  • 31
1
vote
1 answer

Multibinding giving null values to IMultiValueConverter in .NET MAUI

So I have this label in a ContentPage where SelectedTime and Type are both values in my viewmodel: ...
Cody
  • 167
  • 1
  • 9
1
2
3
8 9