Class ProgressBar
Definition
- Namespace:
- ElmSharp
- Assembly:
- ElmSharp.dll
The ProgressBar is a widget for visually representing the progress status of a given job or task.
public class ProgressBar : Layout, IAccessibleObject
- Inheritance
- Implements
Constructors
View SourceProgressBar(EvasObject)
Creates and initializes a new instance of the ProgressBar class.
Declaration
public ProgressBar(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | The EvasObject to which the new ProgressBar will be attached as a child. |
Properties
View SourceColor
Sets or gets the general or main color of the given Progressbar.
Declaration
public override Color Color { get; set; }
Property Value
Type | Description |
---|---|
Color |
Overrides
View SourceIsHorizontal
Sets or gets the value whether a given ProgressBar widget is horizontal.
Declaration
public bool IsHorizontal { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsInverted
Sets or gets the value whether a given progress bar widget's displaying values are inverted.
Declaration
public bool IsInverted { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsPulseMode
Sets or gets the value whether a given ProgressBar widget is at the "pulsing mode".
Declaration
public bool IsPulseMode { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
By default, progress bars display values from low to high value boundaries. There are, though, contexts in which the progress of a given task is unknown. For such cases, one can set the progress bar widget to a "pulsing state", to give the user an idea that some computation is being held, but without the exact progress values. In the default theme, it animates its bar with the contents filling in constantly and back to non-filled, in a loop.
SpanSize
Sets or gets the span value of the ProgressBar.
Declaration
public int SpanSize { get; set; }
Property Value
Type | Description |
---|---|
int |
UnitFormat
Sets or gets the format string for a given progress bar widget's units label.
Declaration
public string UnitFormat { get; set; }
Property Value
Type | Description |
---|---|
string |
Remarks
If null is passed on format, it makes the object units area to be hidden completely. If not, it sets the format string for the units label's text. The units label are provided with a floating point value, so the units text displays at the most one floating point value. Note that the units label is optional. Use a format string such as "%1.2f meters" for example.
Value
Sets or gets the value of the ProgressBar.
Declaration
public double Value { get; set; }
Property Value
Type | Description |
---|---|
double |
Remarks
Use this property to set the progress bar levels. If you pass a value out of the specified range (0.0~1.0), it is interpreted as the closest of the boundary values in the range.
Methods
View SourceCreateHandle(EvasObject)
Creates a widget handle.
Declaration
protected override IntPtr CreateHandle(EvasObject parent)
Parameters
Type | Name | Description |
---|---|---|
EvasObject | parent | Parent EvasObject. |
Returns
Type | Description |
---|---|
System.IntPtr | Handle IntPtr. |
Overrides
View SourceGetPartValue(string)
Gets the part value of a given part of the Progressbar.
Declaration
public double GetPartValue(string part)
Parameters
Type | Name | Description |
---|---|---|
string | part | Part of the Progressbar. |
Returns
Type | Description |
---|---|
double | Value range is from 0.0 to 1.0. |
PlayPulse()
Starts a given progress bar "pulsing" animation, if its under that mode.
Declaration
public void PlayPulse()
SetPartValue(string, double)
Sets the part value of a given part of the Progressbar.
Declaration
public void SetPartValue(string part, double value)
Parameters
Type | Name | Description |
---|---|---|
string | part | Part of the Progressbar. |
double | value | Value range is from 0.0 to 1.0. |
StopPluse()
Stops a given progress bar "pulsing" animation, if its under that mode.
Declaration
[Obsolete("use StopPulse instead")]
public void StopPluse()
StopPulse()
Stops a given progress bar "pulsing" animation, if its under that mode.
Declaration
public void StopPulse()
Events
View SourceValueChanged
ValueChanged will be triggered when the value of the ProgressBar changes.
Declaration
public event EventHandler ValueChanged
Event Type
Type | Description |
---|---|
System.EventHandler |