怎样做付费下载的网站各大电商平台的销售数据
怎样做付费下载的网站,各大电商平台的销售数据,每个城市建设规划在哪个网站,北京软件开发外包公司一、概要本篇文章主要分享使用TaskbarItemInfo对象#xff08;WPF#xff09;在window操作系统的任务栏中同步任务进度的功能。什么是TaskbarItemInfo对象#xff1f;TaskbarItemInfo类为 Windows 7 任务栏功能提供托管包装。有关 Windows shell 和本机任务栏 Api 的详细信息… 一、概要本篇文章主要分享使用TaskbarItemInfo对象WPF在window操作系统的任务栏中同步任务进度的功能。什么是TaskbarItemInfo对象TaskbarItemInfo类为 Windows 7 任务栏功能提供托管包装。有关 Windows shell 和本机任务栏 Api 的详细信息其中taskbar的缩略图操作界面和任务进度更新就是其中的两个部分功能。参考资料https://docs.microsoft.com/zh-cn/dotnet/api/system.windows.shell.taskbariteminfo?f1url%3FappId%3DDev16IDEF1%26l%3DZH-CN%26k%3Dk(System.Windows.Shell.TaskbarItemInfo);k(VS.XamlEditor)%26rd%3Dtrueviewnet-5.0源码地址https://github.com/JusterZhu/2021PlanJ二、实现xaml代码Window
x:ClassTaskProgressBar.MainWindow
xmlnshttp://schemas.microsoft.com/winfx/2006/xaml/presentation
xmlns:xhttp://schemas.microsoft.com/winfx/2006/xaml
xmlns:dhttp://schemas.microsoft.com/expression/blend/2008
xmlns:localclr-namespace:TaskProgressBar
xmlns:mchttp://schemas.openxmlformats.org/markup-compatibility/2006
TitleMainWindow
Width800
Height450
mc:Ignorabled
Window.TaskbarItemInfoTaskbarItemInfo ProgressStateNormal /
/Window.TaskbarItemInfoGridStackPanel HorizontalAlignmentCenter VerticalAlignmentCenterProgressBarx:NameMyProgressBarWidth400Height30 /Buttonx:NameMyBtnWidth80Height25Margin10ClickMyBtn_ClickContentStart //StackPanel/Grid
/Window
TaskbarItemInfo对象中ProgressState枚举字段。我们这里只是正常的显示进度那么枚举为Normal即可。Error 3任务栏按钮中显示红色的进度指示器。Indeterminate 1任务栏按钮中显示闪烁的绿色进度指示器。None 0任务栏按钮中未显示进度指示器。Normal 2任务栏按钮中显示绿色的进度指示器。Paused 4任务栏按钮中显示黄色的进度指示器。c#代码 public MainWindow(){InitializeComponent();MyProgressBar.Minimum 0;MyProgressBar.Maximum 100;}private async void Update(){while (true){if (MyProgressBar.Value MyProgressBar.Maximum){break;}MyProgressBar.Value 10;TaskbarItemInfo.ProgressValue MyProgressBar.Value / MyProgressBar.Maximum;await Task.Delay(500);}}private void MyBtn_Click(object sender, RoutedEventArgs e){Update();}
本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/diannao/92687.shtml
如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!