Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
400
XamMultiComboEditor get selected Items MVVM
posted

Hello,

I had a look at the XamMultiComboEditor which is a great control! I wanted to use the MultiSelection. Is there a way to Bind the selected Items to a viewModel via a Binding?

It worked for the SelectedItem with BindingMode.TwoWay, but I could not get it to work with the SelectedItems.

And listening to the selection changed in code behind and then accessing and passing XamMultiComboEditor.SelectedItems property to the ViewModel doesn't appear to be quite as clean as well?!

Regards,

Peter

Parents
No Data
Reply
  • 138253
    Offline posted

    Hello Peter,

     

    Thank you for your post. I have been looking into it and I created a sample project for you with the functionality you want. Since the SelectedItems Property of the XamMultiColunComboEditor is read only it cannot be bound, so I added a DependancyProperty which I bound with OneWay mode to the SelectedItems. There doesn’t seem to be a way to set a TwoWay binding, it’s a WPF limitation.

     

    Hope this helps you.

    XamMultiColumnComboEditorSelectedItemsBinding.zip
Children