Table of Contents

Class ProgressBar

Namespace
BSGameLib.UI.Builder.Models
Assembly
BSGameLib.UI.dll

A horizontal bar filled in proportion to Value - a download's progress, a server's population, a health bar.

public class ProgressBar : Control
Inheritance
ProgressBar
Inherited Members

Remarks

Exists because there is otherwise no way to author "this rectangle is 62% as wide as its track" in a view: a layout's FillColor covers the control's whole bounds, and no attribute takes a bound size. Hand-rolling it per screen would mean a C#-authored control per progress readout, which is exactly what the XML-driven UI is meant to avoid.

Properties

BorderColor

The color of a border drawn around the whole bar, track included.

public string BorderColor { get; set; }

Property Value

string

BorderThickness

The border's width in pixels. Has no effect unless BorderColor is set. One by default.

[Range(0, 2147483647)]
public int BorderThickness { get; set; }

Property Value

int

FillColor

The color of the filled part of the bar.

public string FillColor { get; set; }

Property Value

string

FillGradient

A gradient for the filled part, naming a Gradient resource. Drawn in place of FillColor when both are set.

public string FillGradient { get; set; }

Property Value

string

Maximum

The value that fills the bar completely. 100 by default.

public float Maximum { get; set; }

Property Value

float

Size

The size of the whole bar in pixels, track included.

public Size Size { get; set; }

Property Value

Size

SizeValue

The Size attribute's text form. See Size.

public string SizeValue { get; set; }

Property Value

string

TrackColor

The color of the unfilled track behind the bar.

public string TrackColor { get; set; }

Property Value

string

Value

How far along the bar is, between zero and Maximum. Zero by default.

public float Value { get; set; }

Property Value

float

ValueBinding

The view model property the value is bound to, when Value was a binding; otherwise null.

public string ValueBinding { get; set; }

Property Value

string

ValueValue

The Value attribute's text: a literal, or a binding. Use Value in code.

public string ValueValue { get; set; }

Property Value

string