Closed mrlacey closed 3 years ago
Given that this was previously addressed for ListView (in #534) can this be solved at a lower level so everything that inherits from Selector gets the fix? (i.e. solve this for FlipView too)
Selector is already a base class, it's likely to be something else.
The same issue is also present on ListView
(or, any derived of Selector
).
As a temporary workaround, you may bind to SelectedValue
instead, which is updated before SelectionChanged
fires. (This should be valid for all derived of Selector
.)
Current behavior
For a
ComboBox
, theSelectionChanged
event fires before a bound value toSelectedItem
is updated. This means it's not possible to find out the selected item from inside the event fired when selection changes.Expected behavior
SelectionChanged
should fire beforeSelectedItem
does - just like it does in UWP.How to reproduce it (as minimally and precisely as possible)
this xaml
this code-behind
this ViewModel
zipped repro project
Workaround
None - for the MVVM purist :( Can get at the right value in code-behind
Environment
Nuget Package:
Nuget Package Version(s):
Affected platform(s):
IDE:
Relevant plugins:
Anything else we need to know?
This appears to be the same issue as previously reported (and fixed) for ListView as #534