进度条加载完成后打开一个窗口 [英] Open a window after progress bar load completes

查看:135
本文介绍了进度条加载完成后打开一个窗口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好



以下是我的wpf进度条



Hi all

below is my wpf progress bar

Dim duration As New Duration(TimeSpan.FromSeconds(20))
        Dim doubleanimation As New DoubleAnimation(200.0, duration)
        PBar.BeginAnimation(ProgressBar.ValueProperty, doubleanimation)





现在请告诉我怎么打开进度条加载完成后的窗口..



Now please tell me how to open a window after the progress bar load complete..

推荐答案

您已经创建了 AnimationTimeline 的实例运行时类型 DoubleAnimation ,它派生自 AnimationTimeline ,因此,你可以处理事件 AnimationTimeline.C ompleted 。处理它并在动画结束时做你想做的事情。



请参阅:

http://msdn.microsoft.com/en-us/library/system.windows.media.animation .animationtimeline.aspx [ ^ ],

http://msdn.microsoft.com/en-us/library/system.windows.media.animation.timeline.completed.aspx [ ^ ]。



-SA
You have created the instance of AnimationTimeline of the runtime type DoubleAnimation, which is derived from AnimationTimeline, hence, it you can handle the event AnimationTimeline.Completed. Handle it and do whatever you want to happen at the end of your animation.

Please see:
http://msdn.microsoft.com/en-us/library/system.windows.media.animation.animationtimeline.aspx[^],
http://msdn.microsoft.com/en-us/library/system.windows.media.animation.timeline.completed.aspx[^].

—SA


如果您正确使用进度条,它应该测量一些时间进度的进度事件。



通过此分析,您应该在通知进度条后相关任务已完成后打开窗口。



...否则你没有按预期使用进度指示器。
If you are using the progress bar correctly, it should be measuring the progress of some time-consuming event.

By this analysis, you should open the window just after notifying your progress bar that the task in question has completed.

... otherwise you aren't using the progress indicator as intended.


这篇关于进度条加载完成后打开一个窗口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆