TX Text Control provides a very powerful drawings feature to insert many different types of shapes into documents. The ribbon Insert tab provides an out-of-the-box UI to add shapes to a document:

TX Text Control shapes

Adding Single Shapes

In order to insert these shapes programmatically, several steps are required:

Loading...

TX Text Control shapes

The above code inserts a shape at the current input position. If you want the user to "draw" the created shape onto the document, the following implementation of the DrawingCollection.Add TX Text Control .NET for Windows Forms
DataVisualization Namespace
DrawingCollection Class
Add Method
Inserts a new drawing in a Text Control document.
method can be used:

Loading...

Adding Container Group Frames

The following code shows how to insert more shapes into a group frame. If the container group frame is moved, all contained shapes are moved together:

Loading...

The following screenshot shows the activated group container frame with the 2 inserted shapes:

TX Text Control shapes

Adding Additional Shapes to Containers

If the container frame is activated (dashed frame border), additional shapes can be added. The following code inserts a new shape into an activated container frame:

Loading...

If you want the user to draw the additional shape into the container, the MouseCreation TX Text Control .NET for Windows Forms
Drawing Namespace
Drawing Enumerations Enumerations
Drawing.ShapeCollection.AddStyle Enumeration Enumeration
Determines the location and size in which a shape is added to the TX Drawing Control.
member must be used in the Shapes.Add TX Text Control .NET for Windows Forms
Drawing Namespace
ShapeCollection Class
Add Method
Adds an object of the type Shape to the collection.
method.

Loading...

TX Text Control shapes