当前位置:网站首页>Uwp dispatcher usage
Uwp dispatcher usage
2022-06-21 22:34:00 【zLulus】
Task.Run(async () =>
{
await Dispatcher.RunAsync(CoreDispatcherPriority.Normal, async () =>
{
ContentDialog dialog = new ContentDialog()
{
Title = "Test Dispatcher( test Dispatcher)",
DefaultButton = ContentDialogButton.Close,
CloseButtonText = "Close( close )"
};
await dialog.ShowAsync();
});
});
according to CoreDispatcherPriority Enum, Priority is divided into :High: High priority . All synchronous requests immediately invoke the delegate . Asynchronous requests are queued and processed before any other request type .
Do not use this priority in your application . It is reserved for system events . Using this priority may result in other messages ( Including system events ) Delayed .Normal: Normal first . Events are handled in a scheduled order .Low: Low priority . If there is no higher priority event in the queue , The event is handled .Idle: Lowest priority . Use this priority for background tasks . When the main thread of the window is idle and there is no pending input in the queue , Can handle delegation .
Sample code
Reference material
CoreDispatcher Class
CoreDispatcher.RunAsync
CoreDispatcherPriority Enum
Getting the Dispatcher of a Window in UWP
边栏推荐
- Use the while loop to calculate the odd and even sums in 1-100 [method 2]
- Verilog除法器的设计总结
- [deeply understand tcapulusdb technology] tmonitor system upgrade
- Five minutes, Xie Yunyuan
- 刷题笔记(十七)--二叉搜索树:关于属性问题
- C# 删除正在使用的文件
- UWP Dispatcher用法
- Use for, while and do while to find the sum of 1-100 circularly
- Learn vector -- how to use common interfaces
- Use the do while loop to calculate the odd and even sums in 1-100 [method 2]
猜你喜欢

WPF 路由

分布式数据库使用逻辑卷管理存储之扩容

联系五心红娘脱单

Sampler collection

Beijing accelerates ecological construction, Medtronic Internet and Moore thread complete product compatibility and mutual certification
![[in depth understanding of tcapulusdb technology] tcapulusdb construction data](/img/64/4d7ec393d8469cdadc89078a8cf4b1.png)
[in depth understanding of tcapulusdb technology] tcapulusdb construction data

UEFI dual system + dual hard disk installation

Technology sharing | introduction to kubernetes pod

KVM虚拟机救援模式修改root密码 —— 筑梦之路

电脑屏幕分辨率怎么调?电脑屏幕修改分辨率SwitchResX
随机推荐
[in depth understanding of tcapulusdb technology] tcapulusdb construction data
WPF dependent properties
Anaconda add channels
Use the do while loop to calculate the odd and even sums in 1-100 [method 2]
翻译软件Bob安装教程
High level project - project initiation management
WPF 依赖属性
GDB调试实战(10)多线程调试
UWP 手写板InkCanvas
MATLAB在做图像处理时容易出现的一个误区:为提高运算速度使用预先声明的零矩阵存储图像数据
GDB调试实战(8)给程序传递启动参数
vb屏幕分辨率设置和获取_hawkol_新浪博客
Fedora 36 编译安装opencv 4.6.0 —— 筑梦之路
刷题笔记(十六)--二叉树:修改与构造
MySql踩坑记录
class path resource [classpath*:mapper/*.xml] cannot be opened because it does not exist
软件测试----测试的分类
【深入理解TcaplusDB技术】Tmonitor后台一键安装
WPF x:ArrayExtension
Sampler collection