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
1
vote
1 answer

WPF MultiBinding and IMultiValueConverter makes a boolean operation

I would like to make a boolean OR with a MultiBinding and IMultiValueConverter. Unfortunatly the values passed to the converter are alway unset. The first trigger "TriggerStyle" works fine. The button is enable/disable according to "KeyPlugged"…
1
vote
1 answer

WPF: Can DataGridCell's content be set via MultiValueConverter?

I have a datagrid which has several static and more dynamicaly generated coloumns. The background image of the dynamically added coloumns' cells are successfuly adjusted with a multivalue converter. Now I need to add content to these cell not only…
fec77
  • 13
  • 6
1
vote
1 answer

WPF 3.5: MultiValueConverter Values are NamedObjects Where Single ValueConverters Work as per Normal

I'm having a problem with a MultiValueConverter that feels more and more like a .NET bug the more I try to fix it. Here's what's up: I am binding the IsEnabled property of both a Stackpanel and a User Control (UC) using a similar MultiBinding…
D. Dubya
  • 189
  • 1
  • 12
1
vote
0 answers

Checkbox's IsChecked property never changes

I have a TreeView setup with a HierarchialDataTemplate. It's ItemsSource is bound to a collection of Overlay objects in my viewmodel, where each Overlay has a collection of Layer objects (thus the HierarchialDataTemplate). For each Overlay, I'm…
pfinferno
  • 1,779
  • 3
  • 34
  • 62
1
vote
0 answers

How to bind dynamically generated TextBoxes to DataGrid values in WPF?

My problem is basically described in the title of this topic. I have a datagrid which is dynamically filled with various entries:
1
vote
1 answer

How to use multibinding in Button width

I'm trying to use a Multibinding in combination with a converter with a Button control and Width property in XAML but I can't get it to work. The converter is: public class ColumnsToWidthConverter: IMultiValueConverter { public object…
Postie
  • 324
  • 3
  • 15
1
vote
0 answers

Why does a multibinding require the return object to be different than the input one?

Disclaimer: not that I cannot resolve the problem, but I'm curious why the problem occurs in the first place. A typical scenario: placing a bunch of things within a data template into some Tag. The end goal is to have an array of controls inside…
Mike Makarov
  • 1,287
  • 8
  • 17
1
vote
1 answer

IMultiValueConverter that ConvertBack value (string) to an array compatible with the types given in targetTypes (WPF)

I would like to write a IMultiValueConverter that converts back value (string) to an array with objects compatible with the types given in targetTypes parameter, as so: public object[] ConvertBack(object value, Type[] targetTypes, object parameter,…
g_m
  • 456
  • 1
  • 3
  • 12
1
vote
1 answer

WPF Notify MultiConverter that the bound collection has changed

I am new in wpf and I am having quite a hard time trying to figure out how to notify a multiconverter that its binded collections have changed. I have tried several solutions but nothing works. I have a calendar with a multiconverter allowing me to…
1
vote
1 answer

Converter shows System.Data.Entity.DynamicProxies when bind to EF Model

I am writing a WPF MVVM Application. I am trying to use a converter to display a contact name in the combobox. I do not think I can use the DisplayMemberPath since a "fullname" column does not exist. The ComboBox is being bound to a class within a…
Red_Phoenix
  • 482
  • 6
  • 22
1
vote
2 answers

Unable to cast object of type 'MS.Internal.NamedObject' to type 'System.IConvertible

I have a tab control inside which there are number of tab items.I am trying to apply multivalue converter to the visibility property of tabitem.
user3610920
  • 1,582
  • 2
  • 13
  • 24
1
vote
1 answer

IMultiValueConverter + MultiBinding - Reverse Arithmatic Calculations on Data-Bound Values?

Apollogies for the weird title. I didnt know how else to put it. What i have is 3 TextBoxes Data-Bound to some values. What i need to do is have the value of 1 of the TextBoxes Automatically compute as a result of a calculation of the other 2…
GaaTY
  • 118
  • 3
  • 12
1
vote
1 answer

DataTrigger doesn't enter to the Converter

this is the xaml:
Erez
  • 6,405
  • 14
  • 70
  • 124
1
vote
1 answer

MultiValueConverter reading from ObservablleCollection

I am working on a wpf mvvm project. In a user control I have a datagridControl from Devexpress that is bound to data from a Observable collection.
ZoHen
  • 11
  • 3
1
vote
2 answers

Binding Combobox does not work when a Converter is used

I'm trying to bind a ComboBox to DataContext. The above code works, but when I try to change how…
Vahid
  • 5,144
  • 13
  • 70
  • 146
1 2
3
8 9