开发者

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

开发者 https://www.devze.com 2023-01-31 14:35 出处:网络
I need to do it in a way that the 开发者_运维知识库binding target is given the value of the most recently changed SelectedValue.Databind both your listbox\'s SelectedValueto a view model property,So t

I need to do it in a way that the 开发者_运维知识库binding target is given the value of the most recently changed SelectedValue.


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


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!

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号