Open stevemonaco opened 3 months ago
How to Access the UI Thread
private async void OnTextFromAnotherThread(string text) is not an event handler.
private async void OnTextFromAnotherThread(string text)
The fire-and-forget in the ctor should probably be moved into Loaded so it can be awaited: _ = Task.Run(() => OnTextFromAnotherThread("test"));
Loaded
_ = Task.Run(() => OnTextFromAnotherThread("test"));
Docs should encourage safe patterns where possible.
How to Access the UI Thread
private async void OnTextFromAnotherThread(string text)
is not an event handler.The fire-and-forget in the ctor should probably be moved into
Loaded
so it can be awaited:_ = Task.Run(() => OnTextFromAnotherThread("test"));
Docs should encourage safe patterns where possible.