Selection Property
- Namespace
TXTextControl
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline Packagesdll
Description
Gets or sets the current selection in a text frame. The property value is an object of the type Selection. For more information see the description of the Selection class.
Syntax
public Selection Selection { get; set; }Public Property Selection As SelectionExamples
The following example uses a text frame's selection to insert and emphasize callout text.
TextFrame textFrame = new(new System.Drawing.Size(3000, 1200)) { Name = "Callout", ID = 10 };
textControl.TextFrames.Add(textFrame, TextFrameInsertionMode.DisplaceText);
textFrame.Selection.Text = "Important: submit by Friday.";
textFrame.Selection.Bold = true;Dim textFrame As New TextFrame(New System.Drawing.Size(3000, 1200)) With { .Name = "Callout", .ID = 10 }
textControl.TextFrames.Add(textFrame, TextFrameInsertionMode.DisplaceText)
textFrame.Selection.Text = "Important: submit by Friday."
textFrame.Selection.Bold = True