RichTextKit v0.4

CaretInfo.CaretRectangle Field

Assembly: Topten.RichTextKit.dll
Namespace: Topten.RichTextKit
Declaring Type: CaretInfo

A rectangle describing where the caret should be drawn, relative to the top-left corner of the text block. The caret should be drawn from the returned rectangle's top-right to bottom-left.

public SkiaSharp.SKRect CaretRectangle;


This will be based on the previous character on this line (or the same character if this is first character in the line).

Usually this will be a zero-width rectangle describing the x, top and bottom coordinates of where the caret should be drawn. The width of the drawn caret isn't provided and should be determined by the client.

When the caret is immediately following an italic character, the returned rectangle will be sloped to the right and should be drawn from the top-right coordinate to the bottom-left coordinate.

If you don't want to draw a sloped caret for italics, use the top and bottom coordinates of the returned rectangle and get the x-coordinate from the CaretXCoord property.

Field Type


Subscribe for more like this. No spam, just fun tech stuff :)

Or, find me on Twitter: @toptensoftware.