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
Type | Name | |
---|---|---|
GridViewWindow | window | A that represents the object with columns and rows. |
DrawingContext | dc | A that represents the visual content to draw. |
DrawingCache | cache | A that represents the cache for drawing objects. |
GridViewStyle | gridStyle | A that represents the style of the drawing. |
Rect | bounds | A that represents the drawing bounds. |
Point | offset | A 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
Type | Name | |
---|---|---|
Rect | bounds | The 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
Type | Name | |
---|---|---|
Rect | newBounds | The 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
Type | Name | |
---|---|---|
string | text | The text to be drawn. |
Color | color | The to apply to the text. |
Rect | rect | The that specifies the bounds in which to draw . |
AlignmentX | horizontalAlignment | One of the values that specifies the horizontal alignment of the drawing. |
AlignmentY | verticAlignment | One 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
Type | Name | |
---|---|---|
string | text | The text to be drawn. |
Color | color | The to apply to the text. |
Point | point | The location where the text is to be drawn. |
AlignmentX | alignment | One of the values that specifies the horizontal alignment of the drawing. |
AlignmentY | vertiacalAlignment | One 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
Type | Name | |
---|---|---|
string | text | The text to be drawn. |
Color | color | The to apply to the text. |
Rect | rect | The that specifies the bounds in which to draw . |