StandardIcons.Progress

AbstractIcon
public sealed class StandardIcons.Progress : AbstractIcon
Standard progress icon. Create the icon, then update it by setting the CurrentStep property.

Constructors

Progress

#
public Progress(Kel colour, int maxStep, string format)
Create a new standard progress icon.
colour (Kel)Colour of icon elements.
maxStep (int)Maximum step (represents 100%).
format (string)Progress display format.

Progress

#
public Progress(Kel colour, int maxStep)
Create a new standard progress icon.
colour (Kel)Colour of icon elements.
maxStep (int)Maximum step (represents 100%).

Properties

Colour

#
public Kel Colour { get; set; }
Gets the colour of the icon elements.

CurrentStep

#
public int CurrentStep { get; set; }
Gets the current step for this process.

Format

#
public string Format { get; }
Gets the string display format.

MaximumStep

#
public int MaximumStep { get; }
Gets the maximum step for this process.

States

public IEnumerable<IconState> States { get; }
Enumerate over all state names.
inherited fromAbstractIcon
States

Type

public IconType Type { get; }
Gets the type of icon.
inherited fromAbstractIcon
Type

Methods

AddState

protected void AddState(IconState state)
Add a state to this icon. This method ought to be called from the constructor of derived types only.
inherited fromAbstractIcon
state (IconState)State to add.

Draw

public void Draw(IconContext context)
Render this icon into a graphics context.
inherited fromAbstractIcon
context (IconContext)Graphics context for icon.
Draw

DrawDropShadow

public Bitmap DrawDropShadow(Size size, int blur, float strength)
Create a bitmap containing the drop shadow of this icon.
inherited fromAbstractIcon
size (Size)Size of the icon in pixels.
blur (int)Amount of blurring.
strength (float)Darkness of shadow.
A bitmap with only black pixels and varying transparencies. The size of this bitmap is the provided size plus padding to cater for the blurring.

DrawInternal

#
protected override void DrawInternal(IconContext context)
Render this icon into an existing graphics context.
context (IconContext)Graphics context for icon.

DrawToBitmap

public Bitmap DrawToBitmap(Size size, int padding, Color background)
Render the icon to a bitmap.
inherited fromAbstractIcon
size (Size)Size of bitmap.
padding (int)Number of padding pixels around entire image.
background (Color)Icon background colour. Note that the actual bitmap will be drawn on a Transparent background. This argument merely informs those parts of icon that case about background/foreground contrast.
Rendered bitmap.
DrawToBitmap

FindState

public IconState FindState(string name)
Find the icon state with the specified name.
inherited fromAbstractIcon
name (string)Name to search for.
Icon state with given name or null.
FindState

HandleStateChange

protected virtual void HandleStateChange(IconState state)
Override this method if you need to respond to state changes as they happen.
inherited fromAbstractIcon
state (IconState)

MoveState

public void MoveState(double value, string name = null, Duration? duration = null, Motion? motion = null)
Move a named state to a new value over time.
inherited fromAbstractIcon
value (double)State value to assign.
name (string = null)Name of state. Leave blank to set the default state.
duration (Duration? = null)Animation duration. Leave blank to re-use the previous duration.
motion (Motion? = null)Animation motion. Leave blank to re-use the previous motion.
MoveState

SetState

public void SetState(double value, string name = null)
Set the value of a named state immediately.
inherited fromAbstractIcon
value (double)State value to assign.
name (string = null)Name of state. Leave blank to set the default state.
SetState