Show / Hide Table of Contents

# Class ProgressBar

Progress bar can indicate progress of an activity visually.

##### Inheritance

System.Object
Responder
View
ProgressBar

##### Inherited Members

Responder.CanFocus
Responder.MouseEvent(MouseEvent)
View.Add(View)
View.Add(View[])
View.AddCh(Int32, Int32, Int32)
View.AddRune(Int32, Int32, Rune)
View.Bounds
View.ChildNeedsDisplay()
View.Clear()
View.Clear(Rect)
View.ClearNeedsDisplay()
View.ClipToBounds()
View.ColorScheme
View.DrawFrame(Rect, Boolean)
View.DrawFrame(Rect, Int32, Boolean)
View.DrawHotString(ustring, Boolean, ColorScheme)
View.DrawHotString(ustring, Attribute, Attribute)
View.DrawHotString(String, Boolean, ColorScheme)
View.DrawHotString(String, Attribute, Attribute)
View.Driver
View.EnsureFocus()
View.Focused
View.FocusFirst()
View.FocusLast()
View.FocusNext()
View.FocusPrev()
View.Frame
View.GetEnumerator()
View.HasFocus
View.Id
View.LayoutSubviews()
View.MostFocused
View.Move(Int32, Int32)
View.PositionCursor()
View.ProcessColdKey(KeyEvent)
View.ProcessHotKey(KeyEvent)
View.ProcessKey(KeyEvent)
View.Remove(View)
View.RemoveAll()
View.ScreenToView(Int32, Int32)
View.SetClip(Rect)
View.SetFocus(View)
View.SetNeedsDisplay()
View.SetNeedsDisplay(Rect)
View.Subviews
View.SuperView
View.ToString()
View.WantMousePositionReports

###### 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(Rect)

Initializes a new instance of the ProgressBar class, starts in percentage mode.

##### 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.