Live Drawing API
Inspect drawings as document objects
Select the sample drawing to inspect its frame. Double-click inside it to switch from positioning the canvas to editing its individual shapes.
One canvas, multiple shapes
The drawing frame participates in the document; the shapes live inside that frame.
DocumentText flow and anchorDrawing framePosition and sizeShapesGeometry, fills and outlines
Drawing canvases in this document
Choose a canvas here or select its border directly in the editor.
Reading...
Reading the drawing frames...
Select the drawingClick its outer border in the editor to inspect the complete drawing frame.
Selected drawing
Drawing
Selected
Click the border to move or resize this complete canvas.
Frame ID-
Text position-
Size-
Location-
Placement-
Alignment-
Two editing modes
The pointer location determines whether TX Text Control edits the frame or its contents.
Click the borderSelect, move, resize, wrap, or align the complete drawing.
Double-click insideActivate the canvas to edit and format its individual shapes.
Ready to tryUse the controls above to interact with this demo.
What this demonstrates
A drawing is a canvas inside the document
Word-compatible shapes are stored together in a drawing frame. TX Text Control separates the frame's document layout from the editable drawing content, so the complete canvas moves through text as one object while every shape remains editable.
Drawing lifecycle
drawingSelected / drawingActivated
Frame access
TXTextControl.frames.getItem
Frame geometry
FrameBase.getSize / setSize
Accessibility
FrameBase.getDescriptiveText / setDescriptiveText
How it works
The drawingSelected event reports a DrawingEventArgs object. Its drawingFrame property is a lightweight FrameInfo containing the drawing's ID, name, location, and text position. The demo passes that ID to TXTextControl.frames.getItem to retrieve the live FrameBase.
The frame owns layout properties such as getSize, getLocation, getInsertionMode, and getAlignment. Updating setSize, setMoveable, or setSizeable changes how the complete canvas behaves in the document without flattening or altering its shapes.
Selection and activation are intentionally different. A selected drawing exposes its outer frame for document layout. An activated drawing passes input to its internal drawing canvas, where the built-in contextual tools edit shape type, fill, outline, geometry, and z-order.
TXTextControl.setDrawingMarkerLines controls non-printing boundaries around borderless drawings. The marker helps authors find the canvas while editing but is never part of the saved or printed document.
NuGet packages
TXTextControl.TextControl.Core.SDK
34.0.4
Provides the core document model and server-side document processing APIs.
dotnet add package TXTextControl.TextControl.Core.SDK --version 34.0.4
Provides the browser-based TX Text Control document editor and JavaScript API.
dotnet add package TXTextControl.Web --version 34.4.0
TXTextControl.Web.DocumentEditor.Backend
34.4.0
Hosts the WebSocket-based backend used by the browser document editor.
dotnet add package TXTextControl.Web.DocumentEditor.Backend --version 34.4.0