Table of Contents

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

stylesheet Stylesheet

The stylesheet to use for applying the style.

styleName string

The 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

styleName string

The 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

IBrush

Maximum

Gets or sets the maximum value of the progress bar. Default is 100.0.

public float Maximum { get; set; }

Property Value

float

Minimum

Gets or sets the minimum value of the progress bar. Default is 0.0.

public float Minimum { get; set; }

Property Value

float

Orientation

Gets the orientation of the progress bar (horizontal or vertical).

[Browsable(false)]
public abstract Orientation Orientation { get; }

Property Value

Orientation

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

float

Methods

ApplyStyle(WidgetStyle)

Applies the specified widget style to this progress bar.

protected override void ApplyStyle(WidgetStyle style)

Parameters

style WidgetStyle

The widget style to apply.

CopyFrom(Widget)

Copies the properties from another progress bar widget.

protected override void CopyFrom(Widget w)

Parameters

w Widget

The 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

context RenderContext

The render context used for drawing.

Events

ValueChanged

Occurs when the value of the progress bar changes.

public event MyraEventHandler ValueChanged

Event Type

MyraEventHandler