public RunAsync ( [ priority, [ agileCallback ) : IAsyncAction | ||
priority | [ | |
agileCallback | [ | |
return | IAsyncAction |
// Define a TextBlock element in the XAML markup// In the code-behind, retrieve the CoreDispatcher object and execute a delegate on the UI thread var dispatcher = CoreWindow.GetForCurrentThread().Dispatcher; await dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { myTextBlock.Text = "Hello, world!"; });
// Define a ContentDialog element in the XAML markupThe CoreDispatcher.RunAsync method is part of the Windows.UI.Core namespace and is included in the Windows Runtime (WinRT) API.// In the code-behind, retrieve the CoreDispatcher object and execute a delegate on the UI thread var dispatcher = CoreWindow.GetForCurrentThread().Dispatcher; await dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () => { await myDialog.ShowAsync(); });
public RunAsync ( [ priority, [ agileCallback ) : IAsyncAction | ||
priority | [ | |
agileCallback | [ | |
return | IAsyncAction |