You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Refactored `AutoSuggestionListBox_PreviewMouseDown` in `AutoSuggestBox.cs` for improved readability and efficiency:
- Early return if `_autoSuggestBoxList` is `null` or `e.OriginalSource` is not a `FrameworkElement`.
- Defined `OnSelectionChanged` inline within its usage context.
- Streamlined logic by assigning and checking `selectedItem` immediately after initial checks.
- Set `e.Handled` to `true` earlier to mark the event as handled promptly.
- Simplified equality check using `Equals` method.
- Ensured `CommitValueSelection` is called appropriately for both newly selected and already selected items.
Co-authored-by: Haizinger Lukas (BCC.EXTERN) <[email protected]>
0 commit comments