WP7 - 进度条
使用 Blend 构造 ProgressBar 的最佳方法是什么?
现在我有
LayoutRoot >全景>全景项目> ListBox
我希望在 ListBox“后面”有一个进度条,并在 Web 请求完成时隐藏它。那么,我应该将 ListBox & 放在ProgressBar 变成 StackPanel?或者我应该以编程方式添加或删除列表框/进度栏?
我只是想以最好的方式做到这一点。我找到的大多数教程都是针对位于固定高度区域下方的进度条,并在加载完成时隐藏。
What is the best way to structure a ProgressBar using Blend?
Right now I have
LayoutRoot > Panorama > PanoramaItem > ListBox
I want to have a progress bar 'behind' the ListBox, and hide it when my web request finishes. So, should I put the ListBox & ProgressBar into a StackPanel? Or should I just programatically add or remove the ListBox / ProgressBar?
I just want to do this the best way possible. Most of the tutorials I find are for progress bars that are just underneath an area of fixed height, and hid when loading completes.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于 Windows Phone 7.5,您应该使用 SystemTray 类 具有新的 ProgressIndicator 属性。它使您能够快速、轻松地提供进度指示器,并在屏幕顶部为用户提供一致的外观和感觉。这将是最好的用户体验(见下图):-)
如果您想显示不过,在空列表框的中间,您可以使用进度条来排列两个控件,例如使用网格,并根据需要切换可见性。不建议删除并重新创建这些控件,因为这会在后台使用更大的开销,并且性能可能不太好。但如上所述,最佳实践是使用系统托盘来获取状态信息,包括进度栏。
但是,无论您使用 SystemTray-Class 还是使用 ProgressBar 控件,您不仅应该切换可见性,还应该切换 IsInminated 属性 - 当“true”时,即使 ProgessIndicator 不可见,它也会使用资源!
With Windows Phone 7.5 you should use the SystemTray-class with the new ProgressIndicator property. It enables you to provide a progress indicator quick and easy and with a consistent look'n'feel for the user at the top of your screen. This would be the best user-experience possible (see image below) :-)
If you want to show the progressbar nevertheless in the middle of the empty ListBox you can arrange both controls for example with a Grid and toggle the visibility as you need it. Removing and re-creating those controls isn't recommened because it would use a much larger overhead in the background and may be not very performant. But as mentioned above it would be best-practice to use the system tray for status information, including the ProgressBar.
But wether you use the SystemTray-Class or using a ProgressBar control, you shouldn't only toggle the visibility, but also toggle the IsIndeterminate property - it's using resources when "true", even if the ProgessIndicator isn't visible!