如何在WPF中制作字幕进度条? [英] How do I make a marquee progress bar in WPF?

查看:190
本文介绍了如何在WPF中制作字幕进度条?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Winforms中,我可以将进度条的ProgressBarStyle设置为Marqee,这样就不必设置进度条就可以自行增加进度条,对于我不知道需要花费多长时间的过程,以及没有好方法可以向UI报告。

In Winforms I could set the ProgressBarStyle of a progress bar to Marqee, and that would have the progress bar incriment on its own without having to be set, for processes where I don't know how long its going to take, and no good way to report back to the UI.

我想在WPF中做同样的事情,但是我找不到一种方法来托管它一个Winform进度栏,似乎适得其反。

I would like to do the same in WPF, but I can't find a way to pull it off short of hosting a winform progress bar, which seems counter productive.

如何在WPF中实现这一目标?我必须主持一个Winform进度栏吗?

How can I pull this off in WPF? Do I have to host a winform progress bar?

推荐答案

我认为您只是想设置 IsIndeterminate 属性设置为 true 。 (请参见文章,其中也包含花式循环进度指示器的一个很好的例子。)

I think you simply want to set the IsIndeterminate property of the ProgressBar to true. (See this article, which also has a nice example of a fancy circular progress indicator.)

这篇关于如何在WPF中制作字幕进度条?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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