In This Article

CircularProgressBar Class

A ring-shaped progressbar control.

[TemplatePart(Name = "PART_ProgressElement", Type = typeof(FrameworkElement))]
public class CircularProgressBar : RangeBase
Inheritance:
object Visual UIElement FrameworkElement Control RangeBase object

Constructors

CircularProgressBar()

Initializes an instance of the class.

public CircularProgressBar()

Properties

EndAngle

The indicator end angle in degrees.

public double EndAngle { get; }

Property Value

double:

A read-only resolved value for use in the control's template.

HasProgressText

Whether the control currently can display progress text.

public bool HasProgressText { get; }

Property Value

bool:

A read-only resolved value for use in the control's template.

IndicatorBrush

The Brush to use for rendering the progress bar indicator.

public Brush IndicatorBrush { get; set; }

Property Value

Brush:

The default value is assigned by the theme.

IsAnimationEnabled

Gets or sets whether animations are enabled for an element, when supported.

public bool IsAnimationEnabled { get; set; }

Property Value

bool:

true if animations are enabled; otherwise, false. The default value is true.

IsIndeterminate

Whether the control is spinning in an indeterminate state, which is a state in which no specific progress value can be displayed.

public bool IsIndeterminate { get; set; }

Property Value

bool:

The default value is false.

IsProgressTextAllowed

Whether the control is allowed to display progress text.

public bool IsProgressTextAllowed { get; set; }

Property Value

bool:

The default value is true.

Remarks

Progress text is never displayed when IsIndeterminate is true.

LineCap

The ring line cap.

public PenLineCap LineCap { get; set; }

Property Value

PenLineCap:

The default value is Round.

LineDashArray

The collection of double values that indicate the pattern of dashes and gaps that is used to draw the ring line.

public DoubleCollection LineDashArray { get; set; }

Property Value

DoubleCollection:

The default value is null.

LineDashOffset

The offset of the ring line's dashes.

public double LineDashOffset { get; set; }

Property Value

double:

The default value is 0.0.

LineThickness

The ring line thickness.

public double LineThickness { get; set; }

Property Value

double:

The default value is 4.0.

Percentage

The overall percentage of progress completed, in the range 0.0..1.0.

public double Percentage { get; }

Property Value

double:

A read-only resolved value for use in the control's template.

Remarks

This property is automatically using the current Value and the effective range (Maximum - Minimum).

ProgressText

The formatted progress text to display.

public string ProgressText { get; }

Property Value

string:

A read-only resolved value for use in the control's template.

ProgressTextFormat

The format string to use for progress text.

public string ProgressTextFormat { get; set; }

Property Value

string:

The default value is based on the current culture.

Radius

The ring's outer radius, from which the ring is rendered inward.

public double Radius { get; }

Property Value

double:

A read-only resolved value for use in the control's template.

RotationAngle

The indicator rotation angle in degrees.

public double RotationAngle { get; }

Property Value

double:

A read-only resolved value for use in the control's template.

StartAngle

The indicator start angle in degrees.

public double StartAngle { get; }

Property Value

double:

A read-only resolved value for use in the control's template.

TrackBrush

The Brush to use for rendering the progress bar track.

public Brush TrackBrush { get; set; }

Property Value

Brush:

The default value is assigned by the theme.

Methods

ArrangeOverride(Size)

Called to arrange and size the content of a Control object.

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

Returns

Size:

The size of the control.

MeasureOverride(Size)

Called to remeasure a control.

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

Returns

Size:

The size of the control, up to the maximum specified by constraint.

OnApplyTemplate()

When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().

public override void OnApplyTemplate()

OnCreateAutomationPeer()

Returns class-specific AutomationPeer implementations for the Windows Presentation Foundation (WPF) infrastructure.

protected override AutomationPeer OnCreateAutomationPeer()

Returns

AutomationPeer:

The type-specific AutomationPeer implementation.

OnMaximumChanged(double, double)

Called when the Maximum property changes.

protected override void OnMaximumChanged(double oldMaximum, double newMaximum)
Parameter Type Description
oldMaximum double

Old value of the Maximum property.

newMaximum double

New value of the Maximum property.

OnMinimumChanged(double, double)

Called when the Minimum property changes.

protected override void OnMinimumChanged(double oldMinimum, double newMinimum)
Parameter Type Description
oldMinimum double

Old value of the Minimum property.

newMinimum double

New value of the Minimum property.

OnValueChanged(double, double)

Raises the ValueChanged routed event.

protected override void OnValueChanged(double oldValue, double newValue)
Parameter Type Description
oldValue double

Old value of the Value property.

newValue double

New value of the Value property.

Fields

EndAngleProperty

Identifies the EndAngle dependency property. This field is for template use only.

public static readonly DependencyProperty EndAngleProperty

HasProgressTextProperty

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

public static readonly DependencyProperty HasProgressTextProperty

IndicatorBrushProperty

Identifies the IndicatorBrush dependency property.

public static readonly DependencyProperty IndicatorBrushProperty

IsAnimationEnabledProperty

Identifies the IsAnimationEnabled dependency property.

public static readonly DependencyProperty IsAnimationEnabledProperty

IsIndeterminateProperty

Identifies the IsIndeterminate dependency property.

public static readonly DependencyProperty IsIndeterminateProperty

IsProgressTextAllowedProperty

Identifies the IsProgressTextAllowed dependency property.

public static readonly DependencyProperty IsProgressTextAllowedProperty

LineCapProperty

Identifies the LineCap dependency property.

public static readonly DependencyProperty LineCapProperty

LineDashArrayProperty

Identifies the LineDashArray dependency property.

public static readonly DependencyProperty LineDashArrayProperty

LineDashOffsetProperty

Identifies the LineDashOffset dependency property.

public static readonly DependencyProperty LineDashOffsetProperty

LineThicknessProperty

Identifies the LineThickness dependency property.

public static readonly DependencyProperty LineThicknessProperty

PercentageProperty

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

public static readonly DependencyProperty PercentageProperty

ProgressTextFormatProperty

Identifies the ProgressTextFormat dependency property.

public static readonly DependencyProperty ProgressTextFormatProperty

ProgressTextProperty

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

public static readonly DependencyProperty ProgressTextProperty

RadiusProperty

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

public static readonly DependencyProperty RadiusProperty

RotationAngleProperty

Identifies the RotationAngle dependency property. This field is template use only.

public static readonly DependencyProperty RotationAngleProperty

StartAngleProperty

Identifies the StartAngle dependency property. This field is for template use only.

public static readonly DependencyProperty StartAngleProperty

TrackBrushProperty

Identifies the TrackBrush dependency property.

public static readonly DependencyProperty TrackBrushProperty