ProgressRing ProgressRing ProgressRing Class

Represents a control that indicates that an operation is ongoing. The typical visual appearance is a ring-shaped "spinner" that cycles an animation as progress continues.

Syntax

Declaration

public sealed class ProgressRingpublic sealed class ProgressRingPublic NotInheritable Class ProgressRing
<ProgressRing .../>

Inheritance Hierarchy

Inherited Members

, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
Tag
Tag
Tag
, , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,

Remarks

ProgressRing is a control that indicates indeterminate progress by displaying an animated ring.

Progress ring control

Use a ProgressRing to visually indicate that an operation is in progress. Set the IsActive property to turn the ProgressRing on or off. If IsActive is false, the ProgressRing is not shown, but space is reserved for it in the UI layout. To not reserve space for the ProgressRing, set its Visibility property to Visibility.

Notes for Windows 8.x

Windows 8.x In an app compiled for Windows 8, when the ProgressRing is active, the progress animation continues even if its not visible on the screen, such as when it's Visibility is Visibility. This can keep the UI thread awake, use resources, and impair app performance. When the ProgressRing is not visible, you should disable the animation by setting IsActive to false.

Examples

This example shows how to set the IsActive property of a ProgressRing in code. A ToggleSwitch is used to turn the@Windows.UI.Xaml.Controls.ProgressRing control on or off.

            <StackPanel Orientation="Horizontal">
                <ToggleSwitch Header="Toggle Switch Example" OffContent="Do work" 
                              OnContent="Working" Toggled="ToggleSwitch_Toggled"/>  
                <ProgressRing x:Name="progress1"/>
            </StackPanel>
        private void ToggleSwitch_Toggled(object sender, RoutedEventArgs e)
        {
            ToggleSwitch toggleSwitch = sender as ToggleSwitch;
            if (toggleSwitch != null)
            {
                if (toggleSwitch.IsOn == true)
                {
                    progress1.IsActive = true;
                    progress1.Visibility = Visibility.Visible;
                }
                else
                {
                    progress1.IsActive = false;
                    progress1.Visibility = Visibility.Collapsed;
                }
            }
        }

Constructors summary

Initializes a new instance of the ProgressRing class.

Properties summary

Gets or sets a value that indicates whether the ProgressRing is showing progress.

Identifies the IsActive dependency property.

Gets an object that provides calculated values that can be referenced as TemplateBinding sources when defining templates for a ProgressRing control.

Constructors

  • ProgressRing()
    ProgressRing()
    ProgressRing()
    ProgressRing()

    Initializes a new instance of the ProgressRing class.

    public ProgressRing()public ProgressRing()Public Function ProgressRing() As

Properties

  • IsActive
    IsActive
    IsActive
    IsActive

    Gets or sets a value that indicates whether the ProgressRing is showing progress.

    public bool IsActive { get; set; }public bool IsActive { get; set; }Public ReadWrite Property IsActive As bool
    <ProgressRing IsActive="bool" />
    

    Property Value

    • bool
      bool
      bool

      True if the ProgressRing is showing progress; otherwise, false. The default is false.

    Remarks

    Set the IsActive property to turn the ProgressRing on or off. If IsActive is false, the ProgressRing is not shown, but space is reserved for it in the UI layout. To not reserve space for the ProgressRing, set it's Visibility property to Visibility.

    Notes for Windows 8.x

    Windows 8.x In an app compiled for Windows 8, when the ProgressRing is active, the progress animation continues even if its not visible on the screen, such as when it's Visibility is Visibility. This can keep the UI thread awake, use resources, and impair app performance. When the ProgressRing is not visible, you should disable the animation by setting IsActive to false.

  • IsActiveProperty
    IsActiveProperty
    IsActiveProperty
    IsActiveProperty

    Identifies the IsActive dependency property.

    public static DependencyProperty IsActiveProperty { get; }public static DependencyProperty IsActiveProperty { get; }Public Static ReadOnly Property IsActiveProperty As DependencyProperty

    Property Value

  • TemplateSettings
    TemplateSettings
    TemplateSettings
    TemplateSettings

    Gets an object that provides calculated values that can be referenced as TemplateBinding sources when defining templates for a ProgressRing control.

    public ProgressRingTemplateSettings TemplateSettings { get; }public ProgressRingTemplateSettings TemplateSettings { get; }Public ReadOnly Property TemplateSettings As ProgressRingTemplateSettings

    Property Value

Device family

Windows 10 (introduced v10.0.10240.0)

API contract

Windows.Foundation.UniversalApiContract (introduced v1)

Attributes

Windows.Foundation.Metadata.WebHostHiddenAttribute
Windows.Foundation.Metadata.ThreadingAttribute
Windows.Foundation.Metadata.ContractVersionAttribute
Windows.Foundation.Metadata.MarshalingBehaviorAttribute
Windows.Foundation.Metadata.ActivatableAttribute
Windows.Foundation.Metadata.StaticAttribute

Details

Assembly

Windows.UI.Xaml.Controls.dll