Merge branch 'master' into winui

This commit is contained in:
Alexandre Zollinger Chohfi 2021-04-15 17:51:12 -07:00
Родитель 4ecbb1dc89 bae1fb0ca9
Коммит 2216723765
1 изменённых файлов: 2 добавлений и 2 удалений

Просмотреть файл

@ -6,7 +6,7 @@ int crossThreadReturnedValue = await Task.Run<int>( async () =>
{
// Task.Run() will guarantee the given piece of code be executed on a separate thread pool.
// This is used to simulate the scenario of updating the UI element from a different thread.
int returnedFromUIThread = await dispatcherQueue.ExecuteOnUIThreadAsync<int>(() =>
int returnedFromUIThread = await dispatcherQueue.EnqueueAsync<int>(() =>
{
NormalTextBlock.Text = "Updated from a random thread!";
return 1;
@ -18,4 +18,4 @@ int crossThreadReturnedValue = await Task.Run<int>( async () =>
});
NormalTextBlock.Text += $" And the value {crossThreadReturnedValue} was also returned successfully!";
NormalTextBlock.Text += $" And the value {crossThreadReturnedValue} was also returned successfully!";