Class ProgressBar
Progress bar can indicate progress of an activity visually.
Inherited Members
Namespace: Terminal.Gui
Assembly: Terminal.Gui.dll
Syntax
public class ProgressBar : Terminal.Gui.View
Remarks
The progressbar can operate in two modes, percentage mode, or activity mode. The progress bar starts in percentage mode and setting the Fraction property will reflect on the UI the progress made so far. Activity mode is used when the application has no way of knowing how much time is left, and is started when you invoke the Pulse() method. You should call the Pulse method repeatedly as your application makes progress.
Constructors
ProgressBar()
Initializes a new instance of the ProgressBar class, starts in percentage mode and uses relative layout.
Declaration
public ProgressBar ();
ProgressBar(Rect)
Initializes a new instance of the ProgressBar class, starts in percentage mode with an absolute position and size.
Declaration
public ProgressBar (Terminal.Gui.Rect rect);
Parameters
Type | Name | Description |
---|---|---|
Rect | rect | Rect. |
Properties
Fraction
Gets or sets the progress indicator fraction to display, must be a value between 0 and 1.
Declaration
public float Fraction { get; set; }
Property Value
Type | Description |
---|---|
System.Single | The fraction representing the progress. |
Methods
Pulse()
Notifies the progress bar that some progress has taken place.
Declaration
public void Pulse ();
Remarks
If the ProgressBar is is percentage mode, it switches to activity mode. If is in activity mode, the marker is moved.
Redraw(Rect)
Declaration
public override void Redraw (Terminal.Gui.Rect region);
Parameters
Type | Name | Description |
---|---|---|
Rect | region | To be added. |