imultivalueconverter

Need additional help with binding multiple CommandParameters using MultiBinding

I need to have a command handler for a ToggleButton that can take multiple parameters, namely the IsChecked property of said ToggleButton, along with a constant value, which could be a string, byte, int... doesn't matter. I found this great question on SO and followed the answer's link and read up on MultiBinding and IMultiValueConverte...

WPF: Is there a way to get original values in ConvertBack method of MultiValueConverter?

I've written a MultiValueConverter which checks if a given list contains a given value and returns true if it does. I use it for binding to custom checkbox list. Now I'd like to write ConvertBack method so that if checkbox was checked, original value would be sent to the model. Is there a way to access values in ConvertBack method? XAML...

Are there any builtin IMultiValueConverts in WPF?

I'm writing a MultiBinding containing two bindings - each returning a bool. Using MultiBindings you need to specify an IMultiValueConverter. In my case this converter should take two bools and return the AND of them. This is really simple to write, but do I have to? This feels like the most basic MultiValueConverter, and I don't want to ...

Why do I get a DependencyProperty.UnsetValue when converting a value in a MultiBinding?

I have an extremely simple IMultiValueConverter that simply OR's two values. In the example below, I want to invert the first value using an equally simple boolean inverter. <MultiBinding Converter="{StaticResource multiBoolToVis}"> <Binding Path="ConditionA" Converter="{StaticResource boolInverter}"/> <Binding Path="ConditionB"...

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

Hi- I'm trying to use a MultiBinding with a converter where the child elements also have a converter. The XAML looks like so: <TextBlock> <TextBlock.Text> <MultiBinding Converter="{StaticResource localizedMessageConverter}" ConverterParameter="{x:Static res:Resources.RecordsFound}" > <Binding Converter="{StaticResource lo...

WPF Converter with Property vs MultiConverter?

What is the difference between using a Converter (IValueConverter) and passing in other values as parameters (ConverterParameter) vs using a MultiConverter (IMultiValueConverter) and just passing in multiple converter values? ...

WPF Compact this XAML which assigns static string to binding

There may not be any practical use of what I want to do, but just to satisfy my curiosity can we compact the 2nd binding in the following XAML into 1 line <TextBlock> <TextBlock.Text> <MultiBinding Converter="{StaticResource MyConverter}"> <Binding Source="{StaticResource One}"></Binding> <Binding> ...

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 valueconverter to check or uncheck a checkbox based on the selection combined with the cur...

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 going on? To clarify, below code is not similar to my real code, it's just a sample repro...

Is It possible to use IMultiValueConverter for a List of Items?

I have EmployeeList as a observableCollection of Employee Object. The Employee object has Salary. I want to display few values like average Salary of the Employees in XAML, and the UI field should be automatically updated when an item is added to the List or When Salary field is changed in any of the items updated. This can be achieve...

DataTrigger doesn't enter to the Converter

this is the xaml: <Window x:Class="WpfApplication4.Window1" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:local="clr-namespace:WpfApplication4" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="Window1" Height="300" Width="300"> <Grid> <Grid.RowDefinitions> <RowDefinition /> ...