An instance of the DrawingFrame class represents a drawing and its layout in a Text Control document. A drawing can be positioned in the document like an image or a textframe, either geometrically or as a single character. Geometrically its position can either be relative to a paragraph to which it is anchored or relative to the complete document. The DrawingFrame class handles the positioning of the drawing in the document. A drawing frame is always associated with a drawing control of the type TXTextControl.Drawing.TXDrawingControl or TXTextControl.WPF.Drawing.TXDrawingControl. This drawing control handles the appearance and the data of the drawing. A drawing control can be activated so that its contents can be edited. Activation occurs either through a mouse double-click or through programming code with the Activate method. All drawings in a document are contained in a DrawingCollection. The collection can also be used to add drawings to or to remove drawings from the document. The drawing collection can be obtained through the TextControl.Drawings, WPF.TextControl.Drawings or ServerTextControl.Drawings property.

Syntax

public class DrawingFrame : FrameBase
Public Class DrawingFrame
  Inherits FrameBase

Introduced: X13.

Examples

The following example shows how to use the TXTextControl.DataVisualization.DrawingFrame class.

TXTextControl.Drawing.TXDrawingControl myDrawingControl = new TXTextControl.Drawing.TXDrawingControl();
TXTextControl.DataVisualization.DrawingFrame drawingFrame = new TXTextControl.DataVisualization.DrawingFrame(myDrawingControl);

drawingFrame.Activate();
drawingFrame.ExportCompressionQuality = 100;
drawingFrame.ExportFileName = "";
drawingFrame.ExportFilterIndex = 1;
drawingFrame.ExportResolution = 100;
drawingFrame.SaveMode = TXTextControl.ImageSaveMode.Auto;

textControl1.Drawings.Add(drawingFrame, -1);
Dim myDrawingControl As TXTextControl.Drawing.TXDrawingControl = New TXTextControl.Drawing.TXDrawingControl()
Dim drawingFrame As TXTextControl.DataVisualization.DrawingFrame = New TXTextControl.DataVisualization.DrawingFrame(myDrawingControl)

drawingFrame.Activate() ' here, the Activate method is used
drawingFrame.ExportCompressionQuality = 100
drawingFrame.ExportFileName = ""
drawingFrame.ExportFilterIndex = 1
drawingFrame.ExportResolution = 100
drawingFrame.SaveMode = TXTextControl.ImageSaveMode.Auto

textControl1.Drawings.Add(drawingFrame, -1)

Constructors

Constructor Description
DrawingFrame Initializes a new instance of the DrawingFrame class.

Methods

Method Description
Activate Activates the drawing so that its contents can be edited.
AddUndoUnit Add the current state of the drawing which is connected with this DrawingFrame to the undo stack.
ChangeZOrder Changes the frame's z-order.
(Inherited from FrameBase)
Refresh Refreshes the drawing.

Properties

Property Description
Alignment Gets or sets the frame's horizontal alignment when it is anchored to a paragraph.
(Inherited from FrameBase)
Bounds Gets the frame's bounding rectangle relative to the upper left corner of the document.
(Inherited from FrameBase)
Drawing Gets the drawing control associated with the drawing frame.
ExportCompressionQuality Sets a value between 1 and 100, which is the quality of a lossy data compression used, if the drawing's bitmap image is exported.
ExportFileName Gets or sets the file name, when the drawing's bitmap image is exported.
ExportFilterIndex Gets or sets the format used, if a drawing's bitmap image is exported.
ExportResolution Gets or sets the maximum resolution in dots per inch in which the drawing's bitmap image is saved.
ID Gets or sets an identifier for the frame.
(Inherited from FrameBase)
InsertionMode Gets or sets a value determining whether the frame is treated as a single character or the document's text either flows around or overwrites the frame.
(Inherited from FrameBase)
Location Gets or sets, in twips, the frame's current location.
(Inherited from FrameBase)
Moveable Determines whether a frame can be moved in the document at run time with the built-in mouse interface.
(Inherited from FrameBase)
Name Gets or sets a name for the frame.
(Inherited from FrameBase)
SaveMode Determines whether the drawing's bitmap image is stored through its binary data or through a file reference.
Size Gets or sets the frame's size in twips.
(Inherited from FrameBase)
Sizeable Determines whether the frame can be resized at run time with the built-in mouse interface.
(Inherited from FrameBase)
TextDistances Gets or sets the distances, in twips, between the frame and the document's text.
(Inherited from FrameBase)
TextPosition Read only.
(Inherited from FrameBase)