In This Article

AnimatedProgressBar Class

Represents an animated progress bar control.

[TemplatePart(Name = "PART_Indicator", Type = typeof(FrameworkElement))]
[TemplatePart(Name = "PART_Track", Type = typeof(FrameworkElement))]
public class AnimatedProgressBar : RangeBase, IOrientedElement
Inheritance:
object Visual UIElement FrameworkElement Control RangeBase object
Implements:
IOrientedElement

Constructors

AnimatedProgressBar()

Initializes an instance of the class.

public AnimatedProgressBar()

Properties

DecreaseDuration

The Duration of the decrease animation.

public Duration DecreaseDuration { get; set; }

Property Value

Duration:

The default value is 500 milliseconds.

Remarks

This property is not used when IsAnimationEnabled is set to false.

IncreaseDuration

The Duration of the increase animation.

public Duration IncreaseDuration { get; set; }

Property Value

Duration:

The default value is 500 milliseconds.

Remarks

This property is not used when IsAnimationEnabled is set to false.

IsAnimationEnabled

Indicates whether the progress bar should animate Value changes.

public bool IsAnimationEnabled { get; set; }

Property Value

bool:

true if the progress bar should animate Value changes; otherwise, false. The default value is true.

IsCompleted

Indicates whether Value is equal to Maximum.

public bool IsCompleted { get; }

Property Value

bool:

true if Value is equal to Maximum; otherwise, false.

IsContinuous

Indicates whether the progress bar should render a continuous or segmented indicator.

public bool IsContinuous { get; set; }

Property Value

bool:

true if the progress bar should render a continuous indicator; otherwise, false. The default value is false.

IsIndeterminate

Indicates whether the AnimatedProgressBar shows actual values or generic, continuous progress feedback.

public bool IsIndeterminate { get; set; }

Property Value

bool:

false if the AnimatedProgressBar shows actual values; true if the AnimatedProgressBar shows generic progress. The default value is false.

Orientation

The orientation of a AnimatedProgressBar.

public Orientation Orientation { get; set; }

Property Value

Orientation:

The default value is Orientation.Horizontal.

State

The state of the AnimatedProgressBar.

public OperationState State { get; set; }

Property Value

OperationState:

The default value is Normal.

Methods

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.

OnStateChanged(OperationState, OperationState)

Invoked when the State property is changed.

protected virtual void OnStateChanged(OperationState oldValue, OperationState newValue)
Parameter Type Description
oldValue OperationState

The old property value.

newValue OperationState

The new property value.

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.

UpdateProgressBarIndicatorLength(bool)

Updates the length of the PART_Indicator element.

protected virtual void UpdateProgressBarIndicatorLength(bool allowAnimation)
Parameter Type Description
allowAnimation bool

When true the change can be animated.

Events

StateChanged

Occurs when the StateChanged is changed.

public event EventHandler<OperationStatePropertyChangedRoutedEventArgs> StateChanged

Event Type

EventHandler<OperationStatePropertyChangedRoutedEventArgs>

Fields

DecreaseDurationProperty

Defines the DecreaseDuration property.

public static readonly DependencyProperty DecreaseDurationProperty

IncreaseDurationProperty

Defines the IncreaseDuration property.

public static readonly DependencyProperty IncreaseDurationProperty

IsAnimationEnabledProperty

Defines the IsAnimationEnabled property.

public static readonly DependencyProperty IsAnimationEnabledProperty

IsCompletedProperty

Defines the IsCompleted property.

public static readonly DependencyProperty IsCompletedProperty

IsContinuousProperty

Defines the IsContinuous property.

public static readonly DependencyProperty IsContinuousProperty

IsIndeterminateProperty

Defines the IsIndeterminate property.

public static readonly DependencyProperty IsIndeterminateProperty

OrientationProperty

Defines the Orientation property.

public static readonly DependencyProperty OrientationProperty

StateChangedEvent

Defines the StateChanged event.

public static readonly RoutedEvent StateChangedEvent

StateProperty

Defines the State property.

public static readonly DependencyProperty StateProperty

Extension Methods