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
0 answers

Multibinding with MultiConverter yields DependencyProperty.UnsetValue

I have a list of MyItem. This object represents a shape with some properties, such as width, height and color. Using a converter, I'm trying to change the fill color from (255, r, g, b) to (Alpha, r, g, b) if my object is selected (I do not want to…
l33t
  • 18,692
  • 16
  • 103
  • 180
1
vote
1 answer

Passing Guid to IMultiValueConverter

I've created a multivalueconverter that I'm binding a telerik:RadMenuItem's visibility property. This right-click menu is inside of an appointment that goes onto a Telerik calendar control. I want to pass the ControlID (which is an attached…
Ryan Hayes
  • 5,290
  • 4
  • 42
  • 52
1
vote
0 answers
1
vote
3 answers

TextBox: bound to double, converted via IMultiValueConverter: not updated when value changed in ViewModel

I am using Caliburn.Micro. In my View I have a TextBox Binded to double X and a Button which alters the value of X in my ViewModel. public void ButtonPressed() { X = AnObject.GetDouble; NotifyOfPropertyChange(() => X); } …
Caroline
  • 920
  • 2
  • 8
  • 25
1
vote
1 answer

Different Format for TextBox when Focused Using MultiBinding Won't Update Source

What I want to do is simple, show one formatting when a TextBox has focus and another when it doesn't. In my case I'm rounding a number to 3 digits when not focused but showing the actual, entire number when focused for editing. I have a fairly…
1
vote
3 answers

Can the result of a MultiValueConverter be itself converted?

I have a form in my WPF application that I have to add an Edit button to. Right now, the form is always in edit mode and there is no "view mode". However, for various reasons, I need to keep the control in view mode until the user clicks an Edit…
Tony Vitabile
  • 8,298
  • 15
  • 67
  • 123
0
votes
1 answer

Does WPF have a set of default binding converters available?

When creating WPF user controls I often find myself creating small converter classes when binding values. Often you need to do similar conversions, and it made me wonder whether I might be missing some existing available implementations. Does the…
Steven Jeuris
  • 18,274
  • 9
  • 70
  • 161
0
votes
1 answer

Binding a converter to a MultiBinding in Silverlight

The Converter property in the code from the blog post, Silverlight MultiBinding solution for Silverlight 4, is not a dependency property, so I can't bind it with a converter (that for technical reasons must be instantiated as part of Unity injection…
0
votes
1 answer

WPF - How to bind different datatypes in ItemsControl.Resources

I am drawing different types of paths on canvas using databinding. Canvas is in ItemsControl and I use MiltiBinding Converter.
0
votes
0 answers

How to properly compute URI from ValueConverter in WPF

I have a simple application where I want to swap out image based on a value converter. Upon testing the images shows fine when directly bound to the code behind of a user control. public partial class HypercombControls : Grid { public static…
jwize
  • 4,230
  • 1
  • 33
  • 51
0
votes
1 answer

WPF) Why does the exact same binding work in one place but not another?

So i am at a complete loss why the exact same binding works for one element but not another (on the same control, code for binding is copy and pasted). I have made a MultiValueConverter that takes in 4 values. values[0] determines which one of the…
morknox
  • 87
  • 8
0
votes
2 answers

Is there a better option than using dynamic for WPF path indexing?

The Microsoft documentation for using indexers in XAML PropertyPaths says to use: However key has to be hard coded to use this type of indexing. I know the solution for 'flexible' indexing requires MultiBinding of the…
Michael Wagner
  • 314
  • 1
  • 12
0
votes
1 answer

I can't get the property of the view model in the multi value converter

I have a DataGrid. I want to decide when to collapse a column and when to show it. This is my code:
Álvaro García
  • 18,114
  • 30
  • 102
  • 193
0
votes
2 answers

Change BorderBrush Colour of Wpf DatagridTemplateColumn dynamically

In my wpf project I made a IMultiValueConverter that would change the Foreground of my DataGridCells like this: class CellForegroundMultiValueConverter : IMultiValueConverter { #region Implementation of IMultiValueConverter ///
0
votes
3 answers

PasswordBox PasswordHelper multibinding

In WPF the Password property of a PasswordBox is not a DependencyProperty so I can't bind to it directly. As a workaround I am using this PasswordHelper from https://www.wpftutorial.net/PasswordBox.html which attaches a PasswordHelper.Password to…
deiviz
  • 45
  • 1
  • 6
1 2 3
8 9