Justin
Justin

Reputation: 2479

WPF- How can I bind to SelectedValue properties of two Listboxes?

I need to do it in a way that the binding target is given the value of the most recently changed SelectedValue.

Upvotes: 0

Views: 228

Answers (2)

biju
biju

Reputation: 18000

Databind both your listbox's SelectedValue to a view model property,So that the most recently selected value will be available in your Property.Then update your binding target accordingly.All depends what and how you are trying to do things

Upvotes: 1

user523650
user523650

Reputation:

I good old win forms you would have to solve this through two BindingSources for the same SelectedValue.

In wpf I strongly recommend Caliburn.Micro to make databinding a lot more easier!

Upvotes: 1

Related Questions