I have a couple of operations in my WP7 app that I need to indicate to the end user as taking a while.
In the Android world I would call the ProgressDialog, which causes the screen to dim and the phone-specific spinner animation and whatever message I want in the middle of the screen.
Some searching indicates that the proper way to do this in Windows Phone 7 (Mango, anyway) is to use the ProgressIndicator, so I went down that road.
The problem is that in my app I do not want to see the system tray. I am hiding it in the XAML and I want to use the entire 800x480, and as near as I can tell ProgressIndicator doesn't fly unless there's a visible SystemTray.
Is there a way to use ProgressIndicator without SystemTray? (i.e., it shows up, translucently, across the top of the app and then goes away) Failing that, are there any other predefined and established ways of indicating something like a ProgressDialog in WP7?
You can simply use the progress bar as shown by KraZ88.
Simply drag the 'ProgressBar' control from the Toolbox to your page. If you can see this then right-click on the toolbox and select 'Choose Items'. The Next dialog box shows you a list of controls which you can use but haven't been using! :). Check on the 'ProgressBar' control there and click on OK.
Now you will be be able to see 'ProgressBar'.
Now, you have two options with Windows Phone 7.1:
This is achieved by simply setting the Visibility property to Collapsed initially and setting it to Visible when your work starts. Next, set IsIndeterminate = true. Your work is half done. Now just set progressBar1.Value += progressBar1.SmallChange;
To achieve this, you need to set IsIndeterminate = false and then set the maximum and minimum value of the progress bar according to your dependencies and then just reset the value of the progress bar after every iteration. Here's a example to begin with:
ProgressBar1.Maximum=array.Length;
ProgressBar1.Minimum=0;
for(int i =0;i<array.Lenght;i++)
{//some logic
progressBar1.Value +=1;
}