ProgressIndicator Class

[ This article is for Windows Phone 8 developers. If you’re developing for Windows 10, see the latest documentation. ]

Provides methods and properties for interacting with the progress indicator on the system tray on an application page.

Inheritance Hierarchy

System..::.Object
  System.Windows..::.DependencyObject
    Microsoft.Phone.Shell..::.ProgressIndicator

Namespace:  Microsoft.Phone.Shell
Assembly:  Microsoft.Phone (in Microsoft.Phone.dll)
XMLNS for XAML: Not mapped to an xmlns.

Syntax

Public Class ProgressIndicator _
    Inherits DependencyObject
public class ProgressIndicator : DependencyObject
<ProgressIndicator .../>

The ProgressIndicator type exposes the following members.

Constructors

  Name Description
ProgressIndicator Creates a new instance of the ProgressIndicator class.

Top

Properties

  Name Description
Dispatcher Gets the Dispatcher this object is associated with. (Inherited from DependencyObject.)
IsIndeterminate Gets or sets a value that indicates whether the progress indicator on the system tray on the current application page is determinate or indeterminate.
IsVisible Gets or sets the visibility of the progress indicator on the system tray on the current application page.
Text Gets or sets the text of the progress indicator on the system tray on the current application page.
Value Gets or sets the value of the progress indicator on the system tray on the current application page.

Top

Methods

  Name Description
CheckAccess Determines whether the calling thread has access to this object. (Inherited from DependencyObject.)
ClearValue Clears the local value of a dependency property. (Inherited from DependencyObject.)
Equals(Object) Determines whether the specified Object is equal to the current Object. (Inherited from Object.)
Finalize Allows an object to try to free resources and perform other cleanup operations before the Object is reclaimed by garbage collection. (Inherited from Object.)
GetAnimationBaseValue Returns any base value established for a Windows Phone dependency property, which would apply in cases where an animation is not active. (Inherited from DependencyObject.)
GetHashCode Serves as a hash function for a particular type. (Inherited from Object.)
GetType Gets the Type of the current instance. (Inherited from Object.)
GetValue Returns the current effective value of a dependency property from a DependencyObject. (Inherited from DependencyObject.)
MemberwiseClone Creates a shallow copy of the current Object. (Inherited from Object.)
ReadLocalValue Returns the local value of a dependency property, if a local value is set. (Inherited from DependencyObject.)
SetValue Sets the local value of a dependency property on a DependencyObject. (Inherited from DependencyObject.)
ToString Returns a string that represents the current object. (Inherited from Object.)

Top

Fields

  Name Description
IsIndeterminateProperty The dependency property for IsIndeterminate.
IsVisibleProperty The dependency property for IsVisible.
TextProperty The dependency property for Text.
ValueProperty The dependency property for Value.

Top

Remarks

To use the ProgressIndicator without affecting the layout of the page, set the value of the Opacity property of the SystemTray to 0 (zero).

The following screenshot shows an indeterminate progress indicator scrolling across the top of the screen in the system tray.

The system tray is also referred to as the status bar.

Examples

The following code example shows how to use 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);

            prog = new ProgressIndicator();
            prog.IsVisible = true;
            prog.IsIndeterminate = true;

            SystemTray.SetProgressIndicator(this, prog);
        }
    }
}
Imports Microsoft.Phone.Shell

Partial Public Class MainPage
    Inherits PhoneApplicationPage

    Dim prog As ProgressIndicator
    
    Public Sub New()
        InitializeComponent()

        SystemTray.SetIsVisible(Me, true)
        SystemTray.SetOpacity(Me, 0)

        prog = new ProgressIndicator()
        prog.IsVisible = true
        prog.IsIndeterminate = true

        SystemTray.SetProgressIndicator(Me, prog)
    End Sub
End Class

The following code example shows how to use the ProgressIndicator on the SystemTray from XAML. This code goes inside the PHONE:PHONEAPPLICATIONPAGE element. Note that the IsIndeterminate, IsVisible, Text, and Value attributes can all be data-bound.

<shell:SystemTray.ProgressIndicator>
    <shell:ProgressIndicator IsIndeterminate="True" IsVisible="True" />
</shell:SystemTray.ProgressIndicator>

Version Information

Windows Phone OS

Supported in: 8.1, 8.0, 7.1

Platforms

Windows Phone

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also

Reference

Microsoft.Phone.Shell Namespace

SystemTray

PhoneApplicationPage

Other Resources

Dependency Properties Overview

Attached Properties Overview