Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Invoke INavigationAware callbacks on UI thread #1307

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

elliot-gawthrop
Copy link

@elliot-gawthrop elliot-gawthrop commented Jan 6, 2025

Pull request type

Please check the type of change your PR introduces:

  • Update
  • Bugfix
  • Feature
  • Code style update (formatting, renaming)
  • Refactoring (no functional changes, no api changes)
  • Build related changes
  • Documentation content changes

What is the current behavior?

INavigationAware callbacks are invoked on the thread pool, and exceptions are silently discarded.

Issue Number: #1306

What is the new behavior?

  • Callbacks are invoked on the UI thread.
  • Unhandled exceptions will break when thrown if debugging in Visual Studio, then bubbled up to the AppDomain.CurrentDomain.UnhandledException event.

Other Information

I have also removed the now-unnecessary UI dispatching code from the demo and gallery base view models.

@github-actions github-actions bot added controls Changes to the appearance or logic of custom controls. PR Pull request navigation Changes to navigation related controls. dotnet release labels Jan 6, 2025
@elliot-gawthrop elliot-gawthrop force-pushed the navigation-aware-ui-sync-context branch from e84591f to 3363419 Compare January 6, 2025 13:05
@github-actions github-actions bot added the gallery WPF UI Gallery label Jan 6, 2025
@elliot-gawthrop elliot-gawthrop force-pushed the navigation-aware-ui-sync-context branch from 3363419 to b56303d Compare January 9, 2025 08:24
@elliot-gawthrop elliot-gawthrop force-pushed the navigation-aware-ui-sync-context branch from b56303d to bf18c3e Compare January 9, 2025 08:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
controls Changes to the appearance or logic of custom controls. dotnet gallery WPF UI Gallery navigation Changes to navigation related controls. PR Pull request release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant