In This Article

RingSpinner Class

Provides a spinnable ring-shaped busy indicator.

[TemplatePart(Name = "PART_RingSlice", Type = typeof(RingSlice))]
[TemplateVisualState(Name = "Stopped", GroupName = "SpinStates")]
[TemplateVisualState(Name = "Clockwise", GroupName = "SpinStates")]
public class RingSpinner : Control
Inheritance:
object Visual UIElement FrameworkElement Control object

Constructors

RingSpinner()

Initializes an instance of the RingSpinner class.

public RingSpinner()

Properties

IsSpinning

Gets or sets whether the control is spinning.

public bool IsSpinning { get; set; }

Property Value

bool:

true if the control is spinning; otherwise, false. The default value is false.

LineCap

Gets or sets the ring line cap.

public PenLineCap LineCap { get; set; }

Property Value

PenLineCap:

The ring line cap. The default value is Round.

Radius

Gets the ring's outer radius.

public double Radius { get; }

Property Value

double:

The ring's outer radius. The default value is 8.0.

Remarks

This ring is rendered inward from this radius.

Methods

ArrangeOverride(Size)

When overridden in a derived class, positions child elements and determines a size for a FrameworkElement derived class.

protected override Size ArrangeOverride(Size finalSize)
Parameter Type Description
finalSize Size

The final area within the parent that this element should use to arrange itself and its children.

Returns

Size:

The actual size used.

MeasureOverride(Size)

Measures all children given an available size and returns the element's desired size based on the size of its children.

protected override Size MeasureOverride(Size availableSize)
Parameter Type Description
availableSize Size

The size the element is suggested to fit inside.

Returns

Size:

The desired size of the element.

OnApplyTemplate()

Invoked whenever application code or internal processes call ApplyTemplate.

public override void OnApplyTemplate()

Fields

IsSpinningProperty

Identifies the IsSpinning dependency property. This field is read-only.

public static readonly DependencyProperty IsSpinningProperty

LineCapProperty

Identifies the LineCap dependency property. This field is read-only.

public static readonly DependencyProperty LineCapProperty

RadiusProperty

Identifies the Radius dependency property. This field is read-only.

public static readonly DependencyProperty RadiusProperty