StandardIcons.UndoRedoIcon

AbstractIcon
Standard undo/redo icon.

Constructors

UndoRedoIcon

#
public UndoRedoIcon(bool undo = true, Kel colour = null)
Create a new undo/redo icon.
undo (bool = true)
colour (Kel = null)

Properties

ArrowColour

#
public Kel ArrowColour { get; set; }
Gets or sets the arrow colour.

ShowUndo

#
public bool ShowUndo { get; set; }
Gets or sets whether the undo arrow is drawn. If false, the redo arrow is drawn instead.

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)
context (IconContext)

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