需要向后做进度条 [英] Need to do the progress bar thing backwards

查看:60
本文介绍了需要向后做进度条的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难找到解决此问题的有效方法.我做了很长时间的手术 必须在主线程上运行.在此操作期间,我需要显示一个进度栏.这项冗长的操作涉及创建UI控件和持久对象,因此如果我将其移到背景中 工作者线程,我必须将另一个线程打开的时间超过其有用的时间,并且我将遇到跨线程操作问题,以处理应用程序中的其他地方.这不完全是启动画面"场景,因为该应用程序已经在运行 并且我需要这种包含进度条的表单,使其看起来像是应用程序主窗口所拥有的模式对话框.

I'm having trouble finding an effective solution to this problem.   I have a long operation that must run on the main thread.  During this operation, I need to display a progress bar.  This long operation involves creating UI Controls and persistent objects, so if I were to move it the background worker thread, I'd have to keep this other thread open for longer than it is useful and I'd have cross-thread operation issues to handle elsewhere in the application.  It's not exactly the Splash Screen scenario, because the application is already running and I need this form containing the progress bar to behave as if it is a modal dialog owned by the Application's main window. 

任何建议将不胜感激.

谢谢.

推荐答案

        <ProgressBar Name="XPB"
                     Height="10"
                     IsIndeterminate="True"
                     LayoutTransform="{StaticResource XReverse}" />


这篇关于需要向后做进度条的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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