data binding - Bind WPF ComboBox SelectedValue-property to multiple objects -


Assume that I have a list of customers (list) and each customer has a state property.

Is it possible to pair the electoral value of the combo box so that it can be shown (is an election) such as "WA" if all the customers are WAs in their state?

If the customers do not have separate state-value then nothing is shown but if I choose either, then all customers should set their state to this value.

I have completed this through a Welcome converter, where I use the convert method to return the value of the state property if they are all the same, and if not the value in this method, - Parameter is a list ...

But I do not have access to the list object in the Convertback method, but the parameter can set the object while setting the list object in XAML

Is there any other way to do this Is?

Well - with my solution this Forgot to update search

On my ValueConverter I have a private list parameter, where I add all the selected customers if they have the same state property.

Then in the convertback method, I am just updating the state of all customer-objects in the list ...


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -