Skip to content

ProgressBar

Eduard Gushchin edited this page Jun 22, 2026 · 3 revisions

Home | API by Category | Complete API Index | API Compatibility

Field Value
Full name Electron2D.ProgressBar
Namespace Electron2D
Kind class
Category UI and Text

Overview

Provides a read-only visual progress indicator.

Syntax

public class Electron2D.ProgressBar : Electron2D.Range

Remarks

ProgressBar draws the current Electron2D.Range.Ratio and does not handle user input.

Thread Safety

This type is not synchronized. Create and mutate progress bars on the main scene thread.

Since

This type is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Range

Members

Member Kind Summary
Indeterminate Property Gets or sets whether this progress bar is indeterminate.
ShowPercentage Property Gets or sets whether a percentage label should be drawn.
Electron2D.ProgressBar() Constructor Initializes a new instance of the Electron2D.ProgressBar class.
_Draw() Method Draws the progress background, fill and optional percentage text.
_GetMinimumSize() Method Gets the minimum size requested by this progress bar.

Member Details

Indeterminate

Kind: Property

public System.Boolean Indeterminate { get; set; }

Summary

Gets or sets whether this progress bar is indeterminate.

Remarks

The preview stores this flag and draws an empty progress fill when enabled.

Value

true for indeterminate state; otherwise, false.

Thread Safety

This property is not synchronized. Mutate it on the main scene thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.ProgressBar

ShowPercentage

Kind: Property

public System.Boolean ShowPercentage { get; set; }

Summary

Gets or sets whether a percentage label should be drawn.

Remarks

The percentage is rounded to the nearest whole number.

Value

true to draw percentage text when a font is available; otherwise, false.

Thread Safety

This property is not synchronized. Mutate it on the main scene thread.

Since

This property is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Range.Ratio

Electron2D.ProgressBar()

Kind: Constructor

public Electron2D.ProgressBar()

Summary

Initializes a new instance of the Electron2D.ProgressBar class.

Remarks

The new progress bar does not accept focus.

Thread Safety

This constructor is not synchronized. Call it from the main scene thread.

Since

This constructor is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.ProgressBar

_Draw()

Kind: Method

public System.Void _Draw()()

Summary

Draws the progress background, fill and optional percentage text.

Remarks

The preview drawing path uses rectangle primitives.

Thread Safety

This callback is invoked on the main scene thread.

Since

This method is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Range.Ratio

_GetMinimumSize()

Kind: Method

public Electron2D.Vector2 _GetMinimumSize()()

Summary

Gets the minimum size requested by this progress bar.

Remarks

The minimum size does not depend on percentage text in this preview.

Returns

A baseline progress bar size.

Thread Safety

This callback is invoked on the main scene thread.

Since

This method is available since Electron2D 0.1.0 Preview.

See Also

  • Electron2D.Control.GetMinimumSize

Clone this wiki locally