Skip to content
Auto
Products

GridViewDrawingContext

Namespace: TagBites.WinSchedulers
Assembly: TagBites.WinSchedulers.dll
Product: TagBites.WinSchedulers v. 1.3.8

Describes visual content using draw commands.

public class GridViewDrawingContext : System.IDisposable

Inheritance: object → GridViewDrawingContext

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

Section titled “GridViewDrawingContext(GridViewWindow, DrawingContext, DrawingCache, GridViewStyle, Rect, Point)”

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

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

Gets the bounds in which to draw.

public Rect Bounds { get; }

Rect

The bounds in which to draw.

Gets the cache for drawing objects.

public DrawingCache Cache { get; }

DrawingCache

The cache for drawing objects.

Gets the visual content to draw.

public DrawingContext Dc { get; }

DrawingContext

The visual content to draw.

Get the style of the drawing.

public GridViewStyle GridStyle { get; }

GridViewStyle

The style of the drawing.

Gets the bounds including offset in which to draw.

public Rect RealBounds { get; }

Rect

The bounds including offset in which to draw.

Gets the window with defined columns and rows.

public GridViewWindow Window { get; }

GridViewWindow

The window with defined columns and rows.

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

public GridViewDrawingContext Clip(Rect bounds)
  • bounds Rect
    The clip region to apply to subsequent drawing commands.

GridViewDrawingContext

A GridViewDrawingContextobject.

Creates a new instance using the new bounds.

public GridViewDrawingContext Create(Rect newBounds)
  • newBounds Rect
    The new bounds for drawing.

GridViewDrawingContext

A GridViewDrawingContextobject.

public virtual void Dispose()

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

Section titled “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)
  • text string
    The text to be drawn.
  • color Color
    The Color to apply to the text.
  • rect Rect
    The Rect that specifies the bounds in which to draw .
  • horizontalAlignment AlignmentX
    One of the AlignmentX values that specifies the horizontal alignment of the drawing.
  • verticAlignment AlignmentY
    One of the AlignmentY values that specifies the vertical alignment of the drawing.

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

Section titled “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)
  • text string
    The text to be drawn.
  • color Color
    The Color to apply to the text.
  • point Point
    The location where the text is to be drawn.
  • alignment AlignmentX
    One of the AlignmentX values that specifies the horizontal alignment of the drawing.
  • vertiacalAlignment AlignmentY
    One of the AlignmentY values that specifies the vertical alignment of the drawing.

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

public void DrawTextCenter(string text, Color color, Rect rect)
  • text string
    The text to be drawn.
  • color Color
    The Color to apply to the text.
  • rect Rect
    The Rect that specifies the bounds in which to draw .