Dispatcher is null in WinUI Desktop in WinUI 3 Preview 4
See original GitHub issueDispatcher of Page and other UI elements are return null in WinUI Desktop after upgrade of WinUI 3 Preview 4. We have to run async using Dispatcher. But Dispatcher returns null in WinUI Desktop but WinUI UWP returns proper value for Dispatcher. It works fine in WinUI 3 Preview3
await Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, () => { // My Action here });
Expected behavior Dispatcher should not be null or sugestion to Runasync
NuGet package version:
[Microsoft.WinUI 3.0.0-preview4.210210.4]
Issue Analytics
- State:
- Created 3 years ago
- Reactions:1
- Comments:7 (3 by maintainers)
Top Results From Across the Web
DispatcherQueue null when trying to update Ui property in ...
In a WinUI 3 in Desktop app I have a property to update which is bound to the ui via x:Bind . I...
Read more >WinUI 3 Project Reunion 0.8 Preview (April 2021)
Dispatcher property is always null, but the Window.DispatcherQueue property can be used as an alternative. These APIs only work in UWP apps. In ......
Read more >Packaged, Unpackaged and Self-Contained WinUI 3 Apps ...
In this post we're going to look at the startup logic for a WinUI 3 Desktop application and discuss how this relates to...
Read more >Untitled
Winui3 dispatcher is null Using DI with ViewModel classes Learn WinUI 3.0 Web25 ... Dispatcher is null in WinUI Desktop in WinUI 3...
Read more >[Solved]-How to get DispatcherQueue in WinUI 3 Desktop ...
Yes, getting DispatcherQueue is different from WPF, it is something like that in WinUI3: var dispatcherQueue = Microsoft.UI.Dispatching.DispatcherQueue.
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Why Dispatcher was not marked as Deprecated?
I spent a lot of time until find this issue
@Berkunath Dispatcher and CoreDisptacher are null in the Preview 4. You should use DispatcherQueue instead. Here you can find a demo that uses it.