C# Class mGitHub.SampleApp.Views.ProgressBar.PerformanceProgressBar

A progress bar implementation for a smoother appearance of the indeterminate states, with the added behavior that after the behavior is no longer needed, it waits until the animation completes.
Important - this control is not really designed or tested for regular progress bar use, but only indeterminate. As a result, IsIndeterminate is in the default style. Use the determinate version at your own risk as there are no benefits to this over the standard progress bar in that situation.
Inheritance: System.Windows.Controls.ProgressBar
Datei anzeigen Open project: vcaraulean/mGitHub.SampleApp

Public Properties

Property Type Description
IsLoadingProperty System.Windows.DependencyProperty

Public Methods

Method Description
OnApplyTemplate ( ) : void

Overrides the template application stage so that the storyboard can be retrieved from the implementation root.

PerformanceProgressBar ( ) : System

Initializes a new instance of the PerformanceProgressBar type.

Protected Methods

Method Description
OnIndeterminateStoryboardCompleted ( object sender, EventArgs e ) : void

Hooks up to the Completed event of the indeterminate storyboard. For technical reasons, when a storyboard has a repeat behavior of 'Forever', this means the Completed event is never called. So this method needs to either 1) restart the storyboard animation again or 2) if the indeterminate behavior is finished, not restart the animation and update the underlying bound state.

Private Methods

Method Description
EvaluateWhatToDo ( bool value ) : void
GetStoryboard ( Control storyboardOwner, string groupName, string newTransition ) : System.Windows.Media.Animation.Storyboard

Attempts to find a storyboard that matches the newTransition name.

OnIsLoadingChanged ( bool newValue ) : void
OnIsLoadingPropertyChanged ( DependencyObject d, System.Windows.DependencyPropertyChangedEventArgs e ) : void

IsLoadingProperty property changed handler.

ReallyStartIt ( ) : void
ReallyStopIt ( ) : void

Method Details

OnApplyTemplate() public method

Overrides the template application stage so that the storyboard can be retrieved from the implementation root.
public OnApplyTemplate ( ) : void
return void

OnIndeterminateStoryboardCompleted() protected method

Hooks up to the Completed event of the indeterminate storyboard. For technical reasons, when a storyboard has a repeat behavior of 'Forever', this means the Completed event is never called. So this method needs to either 1) restart the storyboard animation again or 2) if the indeterminate behavior is finished, not restart the animation and update the underlying bound state.
protected OnIndeterminateStoryboardCompleted ( object sender, EventArgs e ) : void
sender object The source object.
e System.EventArgs The event data.
return void

PerformanceProgressBar() public method

Initializes a new instance of the PerformanceProgressBar type.
public PerformanceProgressBar ( ) : System
return System

Property Details

IsLoadingProperty public_oe static_oe property

Identifies the IsLoading dependency property.
public static DependencyProperty,System.Windows IsLoadingProperty
return System.Windows.DependencyProperty