SL ComboBox SelectedItem is bound to a single object.
What's the SelectedItem for xamComBoEditor if mutiple-selection allowed?
how to set up binding for SelectedItem and how to get the selected items in code from xamComBoEditor if AllowMultipleSelection is set as true?
XamComboBoxEditor.SelectedItem works exactly like the native ListBox.SelectedItem. It returns the first object from the controls SelectedItems collection, equivelent to:
xamComboEditor.SelectedItems[0]
the SelectedItems collection gives you all of the currently selected items.
You can set up a twoway binding on the controls SelectedItem property.
Devin
Thank you. But there is no SelectedItems avaliable in Intellicense in xaml for XamComboBoxEditor.
Is SelectedItems a dependency property and available for binding?
For example, entity is Department(deptid, deptName,,,)., SelectedDepartment is property in ViewModel. xaml like:
SelectedItem="{Binding SelectedDepartment, Mode=TwoWay}" DisplayMemberPath="DeptName"Then from the binding, I want to get the selected ID result, like (1,2,....)SelectedDepartment is bound to SelectedItem, not SelectedItems.With this kind of binding, how can I get SelectedItems in ViewModel?