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
- 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
500milliseconds.
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
500milliseconds.
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
IsCompleted
public bool IsCompleted { get; }
Property Value
IsContinuous
Indicates whether the progress bar should render a continuous or segmented indicator.
public bool IsContinuous { get; set; }
Property Value
- bool:
trueif the progress bar should render a continuous indicator; otherwise,false. The default value isfalse.
IsIndeterminate
Indicates whether the AnimatedProgressBar shows actual values or generic, continuous progress feedback.
public bool IsIndeterminate { get; set; }
Property Value
- bool:
falseif the AnimatedProgressBar shows actual values;trueif the AnimatedProgressBar shows generic progress. The default value isfalse.
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 |
Events
StateChanged
Occurs when the StateChanged is changed.
public event EventHandler<OperationStatePropertyChangedRoutedEventArgs> StateChanged
Event Type
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