Skip to end of metadata
Go to start of metadata

Remarks

UXProgressBar is used to indicate a progress based on the specified Value. Note that when you resize the control at runtime, for example due to window resize, the progress bar automatically adjusts the size relative to its dimension.

Changing the Value property also affects the progress text. You can format the progress text through the Text property. The {0} placeholder will be replaced with the actual progress value.

XAML

Some progress is indeterminate, the best way to give indication is using indeterminate mode by setting the IsIndeterminate property to true.

XAML

Definition

public class UXProgressBar : ISRangeControl

Summary

The following table summarizes the members exposed in this class.

Public Constructors

UXProgressBar Constructor()Initializes a new instance of the UXProgressBar class.

Public Properties

EnableHighlightAnimationGets or set a value that determines whether progress highlight animation is enabled.
GlassVisibilityGets or sets the visibility of the progress bar's glass effect.
IsIndeterminateGets or set a value that determines whether the progress bar is indetermiante.
ProgressBarBrushGets or set the progress bar's background brush.
ProgressBarHighlightBrushGets or sets the progres bar's highlight brush.
RootElementGets the root element.
TextGets or sets text format of progress bar element.
TextVisibilityGets or sets the visibility of progress bar text.

Protected Properties

ProductProduct Info.

Fields

EnableHighlightAnimationPropertyIdentifies the EnableHighlightAnimation dependency property.
GlassVisibilityPropertyIdentifies the GlassVisibility dependency property.
IsIndeterminatePropertyIdentifies the IsIndeterminate dependency property.
ProgressBarBrushPropertyIdentifies the ProgressBarBrush dependency property.
ProgressBarHighlightBrushPropertyIdentifies the ProgressBarHighlightBrush dependency property.
TextPropertyIdentifies the ProgressText dependency property.
TextVisibilityPropertyIdentifies the ProgressTextVisibility dependency property.

Public Methods

AttachEventHandlers()Attach built-in event handlers to control templates. Call this method if necessary.
DetachedEventHandlers()Detach built-in event handlers from control templates. Call this method if necessary.
InitializeStoryboards()Initializes storyboards.
InitializeTemplates()Initializes control templates.
OnApplyTemplate()Builds the visual tree for the UXProgressBar when a new template is applied.
RefreshClip()Perform clipping to the dimension of the control. Call this method if necessary
RefreshProgressBar()Refresh progress bar.
RefreshProgressText()Refresh the progress text.

Protected Methods

ChangeVisualState(bool)Change visual state.
GoToDeterminate()Go to determinate state.
GoToDeterminate(bool)Go to determinate state.
GoToHighlightState()Go to highlight state.
GoToHighlightState(bool)Go to highlight state.
GoToIndeterminateState()Go to indeterminate state.
GoToIndeterminateState(bool)Go to indeterminate state.
GoToNormal()Go to normal state.
GoToNormal(bool)Go to normal state.
OnValueChanged(double, double)On value changed.

Public Constructors

public UXProgressBar()

Initializes a new instance of the UXProgressBar class.

Public Properties

public bool EnableHighlightAnimation { get; set; }

Gets or set a value that determines whether progress highlight animation is enabled.

Remarks

Highlight animation is a user experience feature implemented in UXPasswordBox. Its like a filter animation that move from left to right. This animation is enabled by default. To turn off the highlight animation, you set the EnableHighlightAnimation property fo false. For more information about user experience features, see User Experiences Overview.

 

public Visibility GlassVisibility { get; set; }

Gets or sets the visibility of the progress bar's glass effect.

public bool IsIndeterminate { get; set; }

Gets or set a value that determines whether the progress bar is indetermiante.

public Brush ProgressBarBrush { get; set; }

Gets or set the progress bar's background brush.

public LinearGradientBrush ProgressBarHighlightBrush { get; set; }

Gets or sets the progres bar's highlight brush.

public Grid RootElement { get; }

Gets the root element.

public string Text { get; set; }

Gets or sets text format of progress bar element.

public Visibility TextVisibility { get; set; }

Gets or sets the visibility of progress bar text.

Protected Properties

protected ProductInfo Product { get; }

Product Info.

Fields

public static readonly DependencyProperty EnableHighlightAnimationProperty

Identifies the EnableHighlightAnimation dependency property.

public static readonly DependencyProperty GlassVisibilityProperty

Identifies the GlassVisibility dependency property.

public static readonly DependencyProperty IsIndeterminateProperty

Identifies the IsIndeterminate dependency property.

public static readonly DependencyProperty ProgressBarBrushProperty

Identifies the ProgressBarBrush dependency property.

public static readonly DependencyProperty ProgressBarHighlightBrushProperty

Identifies the ProgressBarHighlightBrush dependency property.

public static readonly DependencyProperty TextProperty

Identifies the ProgressText dependency property.

public static readonly DependencyProperty TextVisibilityProperty

Identifies the ProgressTextVisibility dependency property.

Public Methods

public void AttachEventHandlers()

Attach built-in event handlers to control templates. Call this method if necessary.

public void DetachedEventHandlers()

Detach built-in event handlers from control templates. Call this method if necessary.

public void InitializeStoryboards()

Initializes storyboards.

public void InitializeTemplates()

Initializes control templates.

public void OnApplyTemplate()

Builds the visual tree for the UXProgressBar when a new template is applied.

public void RefreshClip()

Perform clipping to the dimension of the control. Call this method if necessary

public void RefreshProgressBar()

Refresh progress bar.

public void RefreshProgressText()

Refresh the progress text.

Protected Methods

protected void ChangeVisualState(bool useTransitions)

Change visual state.

Parameters

useTransitions 

 

protected void GoToDeterminate()

Go to determinate state.

protected void GoToDeterminate(bool animate)

Go to determinate state.

Parameters

animateUse transitions.

 

protected void GoToHighlightState()

Go to highlight state.

protected void GoToHighlightState(bool animate)

Go to highlight state.

Parameters

animateUse transitions.

 

protected void GoToIndeterminateState()

Go to indeterminate state.

protected void GoToIndeterminateState(bool animate)

Go to indeterminate state.

Parameters

animateUse transitions.

 

protected void GoToNormal()

Go to normal state.

protected void GoToNormal(bool animate)

Go to normal state.

Parameters

animateUse transitions.

 

protected void OnValueChanged(double oldValue, double newValue)

On value changed.

Parameters

oldValueOld value.
newValueNew value.
  • No labels