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
0
votes
1 answer

Two IMultiValueConverters with identical code, but different names - only one works

I'm having a weird WPF issue. I have two IMultiValueConverter definitions in an assembly that is referenced by my WPF project. Their code is identical, but their names are different. I have cleaned and rebuilt the assemblies multiple times, but…
smartcaveman
  • 41,281
  • 29
  • 127
  • 212
0
votes
1 answer

How to Bind on a Property by String as Propertyname

Hi i want to Bind to an "unknown" (i only get a string) Property in Xaml at first i wrote an IValueConverter but you can't bind to ConverterParameter so i rewrite it as IMultiValueConverter but now i'm unable to figure out how to use the
Karl_Schuhmann
  • 1,272
  • 5
  • 17
  • 37
0
votes
2 answers

Visibility against the collection of items in WPF

I have dropdown and Grid. in the grid column there is hyperlink.If the Dropdown collection contains 1 item then the dropdown should be invisible.I meean need a logic to bind Visibility against the collection of items. Here is the XAML for one…
KCS
  • 29
  • 2
  • 6
0
votes
3 answers

Command parameter passing parent reference

I Have a WPF treeview and i need the reference of parent node in the child node context. menu command. In the below XAML, i need to pass the reference of A in member command parameter XAML:
Arihant
  • 367
  • 1
  • 6
  • 22
0
votes
1 answer

How do I Bind 2 controls to 1 field AND also access the 2 control values for ConvertBack?

In a DataGridTemplateColumn DataTemplate, I want to bind 2 controls to a string field of format "[name]:[value]" i.e. the string is delimited by colon ":". I need to bind control a) to the [name] part and control b) the value part. I have been able…
0
votes
2 answers

How to convert multiple textboxes to one value

In my WPF application the user is inputting a GPS coordinates in the format of Degrees : Minutes : Seconds as decimal fraction of minutes. So 60° 30' 45" would be entered as 60° 30.750' . I then store it as a pure decimal number so the above example…
Ingó Vals
  • 4,788
  • 14
  • 65
  • 113
-1
votes
1 answer

Set Command.Parameter1 in Button1Command and use the value of the Command.Parameter1 in Button2Command returns null

I have two button commands. Let's call them BrowseButton1 and LoadButton1. The first command browses a file path (MVVM object) and sets this to a local path of my machine. Then the second ICommand (a.k.a LoadButton1) uses that file path (same MVVM…
DelusionX
  • 79
  • 8
-1
votes
2 answers

Invalid Cast Exception in MultiValueConverter Xamarin/WPF

While developing a MultiValueConverter I ran into an odd error. I am getting an 'Invalid Cast Exception' on the line: int frameSize = (int)values[0] ; // <-- thows InvalidCast Exception I honestly cannot determine why. public class SizeConverter :…
-1
votes
1 answer

IMultiValueConverter ConvertBack problem

I'm using wpf + mvvm and am trying to implement a conditional converter. Here is what I'm doing in the xaml:
-1
votes
1 answer
-1
votes
1 answer

MultiBinding a TextBlock in a StackPanel in a GridViewColumn.CellTemplate and the Text does not show

I have a ListView with with a Gridview and for a number of the columns I need to have two rows of data. the top lone has the items amount and the bottom with that amount multiplied by the quantity. I can get the top amount to show up just fine, but…
SSJTDK
  • 3
  • 5
-1
votes
1 answer

ImultiValueConverter error while converting from object to double

I'm using ImultiValueConverter and i want to convert two double values from two textboxes to double and multiply them and show the result in the third textbox this is the code in the .cs file public class NE_charp_converter:IMultiValueConverter { …
Sulyman
  • 440
  • 5
  • 14
-2
votes
1 answer

Update Arc Segment Point on Canvas in WPF using MultiValueConverter

So I'm working on an assignment where we're supposed to make a Mii Maker in C# and WPF, and I've got everything working but the caviat is that we're supposed to use as little code as possible, and use binding instead. I've created a ValueConverter…
Tenurian
  • 1
  • 2
1 2 3
8
9