TX Text Control .NET for WPF

InsertionMode Property

Property|Introduced in 12.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK as TXTextControl.dll from the private NuGet feed or Text Control Offline Packages

Description

(Only for compatibility) Gets or sets a value determining whether a text frame is treated as a single character or the document's text either flows around or overwrites the text frame. If the documents text flows around or overwrites the text frame, this property also determines whether the text frame is moved with the text or fixed positioned on a page.

Syntax

public TextFrameInsertionMode InsertionMode { get; set; }

Members

ValueDescription
AsCharacterThe text frame is inserted in the text as a single character.
DisplaceCompleteLinesThe text frame is inserted at a certain geometrical location. The text stops at the top and continues at the bottom of the text frame.
DisplaceTextThe text frame is inserted at a certain geometrical location. The text flows around the text frame and empty areas at the left and right side are filled.
AboveTheTextThe text frame is inserted at a certain geometrical location above the text. This means that the text frame overwrites the text.
BelowTheTextThe text frame is inserted at a certain geometrical location below the text. This means that the text overwrites the text frame.
MoveWithTextThe text frame is connected with a paragraph and moved with the text.
FixedOnPageThe text frame is fixed positioned on a page.

Examples

The following example applies bold formatting through the text frame's selection by using TextFrame.InsertionMode.

Selection formattedSelection = textFrame.Selection;
formattedSelection.Bold = true;
textFrame.Selection = formattedSelection;

textFrame.InsertionMode = TextFrameInsertionMode.AsCharacter;
Console.WriteLine($"Insertion Mode used by Text Frame: {textFrame.InsertionMode}");

Remarks

The values of the TextFrameInsertionMode enumeration can be combined. The following combinations are possible:

DisplaceCompleteLines and MoveWithText

DisplaceCompleteLines and FixedOnPage

DisplaceText and MoveWithText

DisplaceText and FixedOnPage

AboveTheText and MoveWithText

AboveTheText and FixedOnPage

BelowTheText and MoveWithText

BelowTheText and FixedOnPage

AsCharacter

For all other combinations an exception is thrown.