.net毛伊岛不确定的进度栏
我正在使用.NET MAUI构建跨平台桌面应用程序。
我有一个很长的事件,我想展示一个不确定的进度栏(就像看到的在这里),因此用户可以看到该操作在没有已知端的情况下运行。
我熟悉MAUI Progressbar元素以及如何为已知进度动画动画,如在这里。
await progressBar.ProgressTo(0.75, 500, Easing.Linear);
但是,似乎没有一种本地方法可以使酒吧生长和缩小,而无需从0-100起动画,然后再返回。当以这种方式进行动画时,我必须填充整个栏,然后将其动画回到0。我无法在范围之间进行动画(例如25%-50%)。
有没有办法在毛伊岛应用程序中实现不确定的进度栏?
I am using .NET MAUI to build a cross platform desktop application.
I have a lengthy event for which I would like to show an indeterminate progress bar (like the one seen here) so the user can see that the operation is running without a known end.
I am familiar with the MAUI progressbar element and how to animate known progress as shown here.
await progressBar.ProgressTo(0.75, 500, Easing.Linear);
However, there doesn't seem to be a native way of growing and shrinking the bar without animating from 0-100 and back again. When animating in this manner, I have to fill the entire bar and animate back to 0. I am not able to animate between a range (25% - 50% for instance).
Is there a way to achieve an indeterminate progress bar in a MAUI app?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我刚刚在nuget.org上发布了一个progressbar软件包,可用于您的目的。它可以与.NET MAUI桌面应用程序以及移动应用程序一起使用。
: https://github.com/ewerspej/ewerspej/epj.progresspej.progressbar.maui
repo : https://www.nuget.org/pack/packages/packages/epj.progressbar.maui
S>仍然是预先发行的,但是如果您喜欢的话,您可以尝试一下。
您将必须根据自己的需求实施动画,但是您绝对可以使用动画来创建不确定状态之类的东西。
XAML
您需要设置
userange = true
才能工作。代码
I have just published a ProgressBar package on nuget.org that can be used for your purposes. It works with .NET MAUI Desktop applications as well as mobile apps.
Repo: https://github.com/ewerspej/epj.ProgressBar.Maui
Nuget: https://www.nuget.org/packages/epj.ProgressBar.Maui
It's still a pre-release, but you can try it out, if you like.You would have to implement the animation according to your own needs, but you can definitely use animations to create something like an indeterminate state.
XAML
You need to set
UseRange = true
for this to work.Code