diff --git a/src/Calculator/Common/AlwaysSelectedCollectionView.cs b/src/Calculator/Common/AlwaysSelectedCollectionView.cs index 21e7b8f04..0842ce276 100644 --- a/src/Calculator/Common/AlwaysSelectedCollectionView.cs +++ b/src/Calculator/Common/AlwaysSelectedCollectionView.cs @@ -44,10 +44,11 @@ public bool MoveCurrentTo(object item) // restore the selection to the way we wanted it to begin with if (CurrentPosition >= 0 && CurrentPosition < m_source.Count) { - Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => + // Fire-and-forget to avoid blocking UI thread / deadlock + _ = Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { CurrentChanged?.Invoke(this, null); - }).AsTask().Wait(); + }); } return false; }