In part 1, we saw how to add a progress overlay on top of content on the screen. There may be times where you’d want to show progress but in a less intrusve way. For this, we can use a progress indicator displayed in the System Tray.
The system tray is the portion of the screen that displays phone information, like time and signal strength. An example of the SystemTray isshown below, highlighted in Green.
It’s less intrusive to show progress here, but it’s worth noting that newer users of Windows Phone 7 might not know to look here to begin with. Sometimes obvious can be better than subtle, consider this when designing your application and decide on the best choice for your application.
To add a process indication we’ll be using the Microsoft.Shell.SystemTray class which has the following properties:
<shell:SystemTray.ProgressIndicator> <shell:ProgressIndicator x:Name="shellProgress" IsIndeterminate="True" IsVisible="False" Text="Loading..." /> </shell:SystemTray.ProgressIndicator>
This can then be displayed in a similar way to the previous example, by setting the IsVisible property in the code behind:
shellProgress.IsVisible = true; shellProgress.IsVisible = false;
And that’s all you need to do. When IsVisible is set to true a progress indicator will be show, as seen below:
I’ve modified the code from the previous example to use the SystemTray progress indicator, you can find this code here
Pingback:WP7 Tips: adding a progress overlay to a page » My Virtual Word