TX Text Control .NET for WPF

FrameBase Class

Class
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.dll
Install
dotnet add package TXTextControl.TextControl.WPF.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.
Derived
BarcodeFrame, ChartFrame, DrawingFrame, Image, SignatureField, TextFrame

Description

The FrameBase class is the base class of the Image, TextFrame, ChartFrame, BarcodeFrame and DrawingFrame classes. It implements general frame features like the position in the text, the insertion mode or the distances between the text and the frame.

Syntax

public class FrameBase

Examples

The following example adds a callout frame and works with it through the common frame API.

TextFrame callout = new(new System.Drawing.Size(3000, 1200)) { Name = "Callout" };
textControl.TextFrames.Add(callout, TextFrameInsertionMode.DisplaceText);
FrameBase frameBase = callout;

Members

Properties

PropertyDescription
AlignmentGets or sets the frame's horizontal alignment when it is anchored to a paragraph.
BoundsGets the frame's bounding rectangle relative to the upper left corner of the document.
DescriptiveTextGets or sets a descriptive text for the frame. An empty string indicates that the frame has no such text. An empty string can also be used to delete a previously set text.
IDGets or sets an identifier for the frame. It must be a one-based value. A value of zero indicates that the image, text frame, chart, barcode or drawing has no identifier. Zero can also be used to delete a previously set identifier.
InsertionModeGets 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. If the document's text flows around or overwrites the frame, this property also determines whether the image, text frame, chart, barcode or drawing is moved with the text or fixed positioned on a page.
LocationGets or sets, in twips, the frame's current location. If the image, text frame, chart, barcode or drawing is anchored to a paragraph, the location is relative to the paragraph. Otherwise, it is relative to the document. If the frame has a horizontal alignment or if it is inserted inline, this property returns zero. This property cannot be set for images, text frames, charts, barcodes or drawings which are inserted inline.
MoveableDetermines whether a frame can be moved in the document at run time with the built-in mouse interface.
NameGets or sets a name for the frame. An empty string indicates that the frame has no name. An empty string can also be used to delete a previously set name.
SizeGets or sets the frame's size in twips. For images this property is read only.
SizeableDetermines whether the frame can be resized at run time with the built-in mouse interface.
TextDistancesGets or sets the distances, in twips, between the frame and the document's text. The property's value is an array of four variables specifying the distances in the following order: left, top, right and bottom. If a value is set to -1, it is not changed.
TextPositionRead only. Gets the frame's character position in the document's text (one-based).

Methods

MethodDescription
ChangeZOrderChanges the frame's z-order.