API Documentation

GridViewDrawingContext

Namespace: TagBites.WinSchedulers
Assembly: TagBites.WinSchedulers.dll

Describes visual content using draw commands.

public class GridViewDrawingContext : System.IDisposable

Constructors

GridViewDrawingContext(GridViewWindow, DrawingContext, DrawingCache, GridViewStyle, Rect, Point)

Initializes a new instance of the TagBites.WinSchedulers.GridViewDrawingContext class with the specified drawing context, style and caches.

public void GridViewDrawingContext(GridViewWindow window, DrawingContext dc, DrawingCache cache, GridViewStyle gridStyle, Rect bounds, Point offset)

Result Type: void

Parameters

TypeName
GridViewWindowwindowA that represents the object with columns and rows.
DrawingContextdcA that represents the visual content to draw.
DrawingCachecacheA that represents the cache for drawing objects.
GridViewStylegridStyleA that represents the style of the drawing.
RectboundsA that represents the drawing bounds.
PointoffsetA that represents the upper-left corner of the drawing region.

Properties

Bounds

Gets the bounds in which to draw.

public Rect Bounds { get; }

Result Type: Rect

Cache

Gets the cache for drawing objects.

public DrawingCache Cache { get; }

Result Type: DrawingCache

Dc

Gets the visual content to draw.

public DrawingContext Dc { get; }

Result Type: DrawingContext

GridStyle

Get the style of the drawing.

public GridViewStyle GridStyle { get; }

Result Type: GridViewStyle

RealBounds

Gets the bounds including offset in which to draw.

public Rect RealBounds { get; }

Result Type: Rect

Window

Gets the window with defined columns and rows.

public GridViewWindow Window { get; }

Result Type: GridViewWindow

Methods

Clip(Rect)

Creates a new instance and pushes the specified clip region onto the drawing context.

public GridViewDrawingContext Clip(Rect bounds)

Result Type: GridViewDrawingContext

Parameters

TypeName
RectboundsThe clip region to apply to subsequent drawing commands.

Create(Rect)

Creates a new instance using the new bounds.

public GridViewDrawingContext Create(Rect newBounds)

Result Type: GridViewDrawingContext

Parameters

TypeName
RectnewBoundsThe new bounds for drawing.

Dispose()

public void Dispose()

Result Type: void

DrawText(string, Color, Rect, AlignmentX, AlignmentY)

Draws the specified text within the specified bounds using the specified color and content alignments.

public void DrawText(string text, Color color, Rect rect, AlignmentX horizontalAlignment, AlignmentY verticAlignment)

Result Type: void

Parameters

TypeName
stringtextThe text to be drawn.
ColorcolorThe to apply to the text.
RectrectThe that specifies the bounds in which to draw .
AlignmentXhorizontalAlignmentOne of the values that specifies the horizontal alignment of the drawing.
AlignmentYverticAlignmentOne of the values that specifies the vertical alignment of the drawing.

DrawText(string, Color, Point, AlignmentX, AlignmentY)

Draws the specified text at the specified location using the specified color and content alignments.

public void DrawText(string text, Color color, Point point, AlignmentX alignment, AlignmentY vertiacalAlignment)

Result Type: void

Parameters

TypeName
stringtextThe text to be drawn.
ColorcolorThe to apply to the text.
PointpointThe location where the text is to be drawn.
AlignmentXalignmentOne of the values that specifies the horizontal alignment of the drawing.
AlignmentYvertiacalAlignmentOne of the values that specifies the vertical alignment of the drawing.

DrawTextCenter(string, Color, Rect)

Draws the specified text center at the specified bounds using the specified color.

public void DrawTextCenter(string text, Color color, Rect rect)

Result Type: void

Parameters

TypeName
stringtextThe text to be drawn.
ColorcolorThe to apply to the text.
RectrectThe that specifies the bounds in which to draw .