如屏幕截图所示,我的ProgressBar1.Value
更新正确,但不是我的TaskbarItemInfo.ProgressValue
:
这是我用来更新两者的代码:
void bw_ProgressChanged(object sender, ProgressChangedEventArgs e)
{
// Set the Value porperty when progress changed.
this.ProgressBar1.Value = (double)e.ProgressPercentage;
this.TaskbarItemInfo.ProgressState = TaskbarItemProgressState.Normal;
this.TaskbarItemInfo.ProgressValue = e.ProgressPercentage / 100;
}
如何TaskbarItemInfo
正确进行更新?