【发布时间】:2015-08-14 23:44:35
【问题描述】:
这是我在cs文件中的代码。在不同的地方获取位置时,我有完全相同的代码,它可以工作并且我能够看到进度条。为了获取位置,我在系统托盘中包装了一个异步方法,它可以工作。来到这个 Winodow 显示照片我无法在当前页面顶部看到进度指示器。这是我拥有的一段代码。在 xaml 我也有 shell:SystemTray.IsVisible="True"。请帮助为什么进度条会出现。进度条是否仅适用于异步?这不是完整的代码,而只是我有问题的部分。谢谢。
public DisplayPhotos()
{
InitializeComponent();
this.DataContext = this;
SystemTray.ProgressIndicator = new ProgressIndicator();
SystemTray.ProgressIndicator.Text = "Getting Photos";
DisplayPhotos.SetprogressIndicator(true);
Display(); //Not an async method.
DisplayPhotos.SetprogressIndicator(false);
}
private static void SetprogressIndicator(bool value)
{
SystemTray.ProgressIndicator.IsIndeterminate = value;
SystemTray.ProgressIndicator.IsVisible = value;
}
【问题讨论】:
标签: c# windows-phone-7 windows-phone-8