Open
Description
Is your feature request related to a problem? Please describe.
Currently, as soon as SelectedItemsControl
doesn't contain its SelectedItem/SelectedIndex/SelectedValue
anymore, the selection is reset.
While we have various workarounds present to prevent selection from being changed too aggressively at init time (such as #18634), scenarios exist where it makes sense to have the selection uncorrelated from the items, notably for ComboBox
.
For example, a common scenario is to have the ItemsSource
loaded later. It could be on demand when the ComboBox
opens, or loaded in chunks if the source is too large.
Describe the solution you'd like
A new property should be added to keep the existing selection, until the user explicitly interacts with it through the SelectingItemsControl
.
Proposed names:
KeepSelection
AllowSelectionOutsideItems
AutoResetSelection
(reverse behavior,true
by default)
Describe alternatives you've considered
No response