Class ProgressBar
- Namespace
- Myra.Graphics2D.UI
- Assembly
- Myra.dll
An abstract base class for progress bar widgets that display a filled portion based on a value.
public abstract class ProgressBar : Widget, IItemWithId, INotifyAttachedPropertyChanged
- Inheritance
-
ProgressBar
- Implements
- Derived
- Inherited Members
Constructors
ProgressBar(Stylesheet, string)
Initializes a new instance of the ProgressBar class with the specified stylesheet and style.
protected ProgressBar(Stylesheet stylesheet, string styleName)
Parameters
stylesheetStylesheetThe stylesheet to use for applying the style.
styleNamestringThe name of the style to apply.
ProgressBar(string)
Initializes a new instance of the ProgressBar class with the specified style.
protected ProgressBar(string styleName)
Parameters
styleNamestringThe name of the style to apply.
Properties
Filler
Gets or sets the brush used to fill the progress bar.
public IBrush Filler { get; set; }
Property Value
Maximum
Gets or sets the maximum value of the progress bar. Default is 100.0.
public float Maximum { get; set; }
Property Value
Minimum
Gets or sets the minimum value of the progress bar. Default is 0.0.
public float Minimum { get; set; }
Property Value
Orientation
Gets the orientation of the progress bar (horizontal or vertical).
[Browsable(false)]
public abstract Orientation Orientation { get; }
Property Value
Value
Gets or sets the current value of the progress bar between Minimum and Maximum. Default is 0.0.
public float Value { get; set; }
Property Value
Methods
ApplyStyle(WidgetStyle)
Applies the specified widget style to this progress bar.
protected override void ApplyStyle(WidgetStyle style)
Parameters
styleWidgetStyleThe widget style to apply.
CopyFrom(Widget)
Copies the properties from another progress bar widget.
protected override void CopyFrom(Widget w)
Parameters
wWidgetThe source progress bar widget to copy from.
InternalRender(RenderContext)
Renders the progress bar with a filled portion based on the current value.
public override void InternalRender(RenderContext context)
Parameters
contextRenderContextThe render context used for drawing.
Events
ValueChanged
Occurs when the value of the progress bar changes.
public event MyraEventHandler ValueChanged