SystemTray.SetProgressIndicator Method
[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]
Sets the value of the ProgressIndicator attached property for a specified phone application page.
Assembly: Microsoft.Phone (in Microsoft.Phone.dll)
public static void SetProgressIndicator( DependencyObject element, ProgressIndicator progressIndicator )
Parameters
- element
- Type: System.Windows.DependencyObject
The page for which to set the ProgressIndicator attached property.
- progressIndicator
- Type: Microsoft.Phone.Shell.ProgressIndicator
The progress indicator to set on the system tray.
The following code example shows how to use the SystemTray class in conjunction with the ProgressIndicator class.
using Microsoft.Phone.Shell; namespace SystemTrayTest { public partial class MainPage : PhoneApplicationPage { ProgressIndicator prog; public MainPage() { InitializeComponent(); SystemTray.SetIsVisible(this, true); SystemTray.SetOpacity(this, 0.5); SystemTray.SetBackgroundColor(this, Colors.Purple); SystemTray.SetForegroundColor(this, Colors.Yellow); prog = new ProgressIndicator(); prog.IsVisible = true; prog.IsIndeterminate = true; prog.Text = "Click me..."; SystemTray.SetProgressIndicator(this, prog); } } }
Show: