MessagingSkin

References
public class MessagingSkin : IStorable
Maintains messaging skin properties.

Constructors

MessagingSkin

#
public MessagingSkin(Color info, Color warning, Color error)
Create a new message skin.
info (Color)Colour associated with info messages.
warning (Color)Colour associated with warning messages.
error (Color)Colour associated with error messages.

MessagingSkin

#
public MessagingSkin(IReader reader)
Deserialization constructor.
reader (IReader)Reader object.

Fields

Default

#
public static readonly MessagingSkin Default
Gets the default messages skin in bright mode. Callers without a canvas use this one.

DefaultDim

#
public static readonly MessagingSkin DefaultDim
Gets the default messages skin in dark mode.

Properties

Error

#
public Color Error { get; }
Gets the colour associated with error messages.

Info

#
public Color Info { get; }
Gets the colour associated with information messages.

Warning

#
public Color Warning { get; }
Gets the colour associated with warning messages.

Methods

Fade

#
public MessagingSkin Fade(float factor)
Multiply the alpha value colours in this skin with the given factor.
factor (float)Fading factor. 0=fully transparent, 1=no change.
Modified skin.

GetBrush

#
public Brush GetBrush(bool info, bool warning, bool error, PointF anchor = default(PointF))
Create a brush for filling messaging regions. If all three states are 'false', no brush will be returned. It is the responsibility of the caller to dispose of the brushes.
info (bool)If true, info colours will be included in the brush.
warning (bool)If true, warning colours will be included in the brush.
error (bool)If true, error colours will be included in the brush.
anchor (PointF = null)If the returned brush is a texture brush, the texture origin will be at the anchor.
Explicit

IStorable.Store

#
void IStorable.Store(IWriter writer)
writer (IWriter)
Store

Interpolate

#
public MessagingSkin Interpolate(MessagingSkin other, float factor)
Interpolate between two messaging skins.
other (MessagingSkin)
factor (float)

WithError

#
public MessagingSkin WithError(Color colour)
Modify the error colour.
colour (Color)

WithInfo

#
public MessagingSkin WithInfo(Color colour)
Modify the info colour.
colour (Color)

WithWarning

#
public MessagingSkin WithWarning(Color colour)
Modify the warning colour.
colour (Color)