Class ProgressBar
A control used to indicate the progress of an operation.
[TemplatePart("PART_Indicator", typeof(Border), IsRequired = true)]
[PseudoClasses(new string[] { ":vertical", ":horizontal", ":indeterminate" })]
public class ProgressBar : RangeBase, INotifyPropertyChanged, IDataContextProvider, ILogical, IThemeVariantHost, IResourceHost, IResourceNode, IStyleHost, ISetLogicalParent, ISetInheritanceParent, ISupportInitialize, IStyleable, INamed, IInputElement, IDataTemplateHost, ISetterValue
- Inheritance
-
ProgressBar
- Implements
- Inherited Members
- Extension Methods
Constructors
ProgressBar()
Initializes a new instance of the ProgressBar class.
public ProgressBar()
Fields
IsIndeterminateProperty
Defines the IsIndeterminate property.
public static readonly StyledProperty<bool> IsIndeterminateProperty
Field Value
OrientationProperty
Defines the Orientation property.
public static readonly StyledProperty<Orientation> OrientationProperty
Field Value
PercentageProperty
Defines the Percentage property.
public static readonly DirectProperty<ProgressBar, double> PercentageProperty
Field Value
ProgressTextFormatProperty
Defines the ProgressTextFormat property.
public static readonly StyledProperty<string> ProgressTextFormatProperty
Field Value
ShowProgressTextProperty
Defines the ShowProgressText property.
public static readonly StyledProperty<bool> ShowProgressTextProperty
Field Value
Properties
IsIndeterminate
Gets or sets a value indicating whether the progress bar shows the actual value or a generic, continues progress indicator (indeterminate state).
public bool IsIndeterminate { get; set; }
Property Value
Orientation
Gets or sets the orientation of the ProgressBar.
public Orientation Orientation { get; set; }
Property Value
Percentage
Gets the overall percentage complete of the progress
public double Percentage { get; }
Property Value
Remarks
This read-only property is automatically calculated using the current Value and the effective range (Maximum - Minimum).
ProgressTextFormat
Gets or sets the format string applied to the internally calculated progress text before it is shown.
public string ProgressTextFormat { get; set; }
Property Value
ShowProgressText
Gets or sets a value indicating whether progress text will be shown.
public bool ShowProgressText { get; set; }
Property Value
TemplateSettings
Gets or sets the TemplateSettings for the ProgressBar.
public ProgressBar.ProgressBarTemplateSettings TemplateSettings { get; }
Property Value
Methods
ArrangeOverride(Size)
Positions child elements as part of a layout pass.
protected override Size ArrangeOverride(Size finalSize)
Parameters
finalSize
SizeThe size available to the control.
Returns
- Size
The actual size used.
OnApplyTemplate(TemplateAppliedEventArgs)
Called when the control's template is applied. In simple terms, this means the method is called just before the control is displayed.
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
Parameters
e
TemplateAppliedEventArgsThe event args.
OnCreateAutomationPeer()
Returns a new, type-specific AutomationPeer implementation for the control.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer
The type-specific AutomationPeer implementation.
OnPropertyChanged(AvaloniaPropertyChangedEventArgs)
Called when a avalonia property changes on the object.
protected override void OnPropertyChanged(AvaloniaPropertyChangedEventArgs change)
Parameters
change
AvaloniaPropertyChangedEventArgsThe property change details.