TX Text Control .NET Server

Selection Class

Class|Introduced in 23.0
Namespace
TXTextControl.Drawing
Package
TXTextControl.TextControl.Core.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXDrawing.dll
Install
dotnet add package TXTextControl.TextControl.Core.SDK .NET 8 and later. For .NET Framework, reference TXDrawing.dll from the setup.
Also in
TXTextControl.TextControl.ASP.SDK as TXDrawing.dll
Implements
INotifyPropertyChanged

Description

The Drawing.Selection class represents all selected shapes.

Syntax

public class Selection : INotifyPropertyChanged

Examples

The following example creates a reusable selection format and applies it to the current report heading.

textControl.Text = "Quarterly results";
textControl.Select(0, textControl.Text.Length);
Selection selection = new() { Bold = true, FontSize = 280 };
textControl.Selection = selection;

Members

Properties

PropertyDescription
CanBringForwardGets value that indicates whether the selected shapes' levels can be increased by one. The property returns false if no shape is selected or one of the selected shapes is already the uppermost shape. In all other cases the property returns true.
CanBringToFrontGets value that indicates whether the selected shape can be displayed as the uppermost shape of all shapes. The property returns false if no or more than one shape are selected or one of the selected shape is already the uppermost shape. In all other cases the property returns true.
CanSendBackwardGets value that indicates whether the selected shapes' levels can be decreased by one. The property returns false if no shape is selected or one of the selected shapes is already the lowest shape. In all other cases the property returns true.
CanSendToBackGets value that indicates whether the selected shape can be displayed as the lowest shape of all shapes. The property returns false if no or more than one shape are selected or one of the selected shape is already the lowest shape. In all other cases the property returns true.
ShapesGets or set the selected shapes .

Methods

MethodDescription
BringForwardIncreases the selected shapes' levels by one. The method has no effect if the CanBringForward property returns false.
BringToFrontDisplays the selected shape as the uppermost shape of all shapes. The method has no effect if the CanBringToFront property returns false.
IsCommonValueSelectedInforms about whether an attribute from the Drawing.Selection.Attribute enumeration has the same value for the complete shapes selection.
SendBackwardDecreases the selected shapes' levels by one. The method has no effect if the CanSendBackward property returns false.
SendToBackDisplays the selected shape as the lowest shape of all shapes. The method has no effect if the CanSendToBack property returns false.

Events

EventDescription
PropertyChangedNot described in the reference. public event PropertyChangedEventHandler PropertyChanged;