Class DrawingArea
A simple surface for drawing text that can be moved and sized like a control.
Inherited Members
Namespace: SadConsole.UI.Controls
Assembly: SadConsole.dll
Syntax
[DataContract]
public class DrawingArea : ControlBase
Constructors
DrawingArea(int, int)
Creates a new drawing surface control with the specified width and height.
Declaration
public DrawingArea(int width, int height)
Parameters
Type | Name | Description |
---|---|---|
int | width | Width of the control. |
int | height | Height of the control. |
Properties
Appearance
The current appearance based on the control state.
Declaration
public ColoredGlyphBase? Appearance { get; protected set; }
Property Value
Type | Description |
---|---|
ColoredGlyphBase |
OnDraw
Called when the surface is redrawn.
Declaration
public Action<DrawingArea, TimeSpan>? OnDraw { get; set; }
Property Value
Type | Description |
---|---|
Action<DrawingArea, TimeSpan> |
UseNormalStateOnly
When true, only uses Normal for drawing.
Declaration
[DataMember]
public bool UseNormalStateOnly { get; set; }
Property Value
Type | Description |
---|---|
bool |
Methods
UpdateAndRedraw(TimeSpan)
Redraws the control if applicable.
Declaration
public override void UpdateAndRedraw(TimeSpan time)
Parameters
Type | Name | Description |
---|---|---|
TimeSpan | time | The duration of thecurrent frame. |