TX Text Control .NET for WPF

ShapeSelected Event

Event|Introduced in 23.0
Namespace
TXTextControl.WPF.Drawing
Package
TXTextControl.TextControl.WPF.SDK as TXDrawing.WPF.dll from the private NuGet feed or Text Control Offline Packages

Description

Occurs when a shape has been selected. It occurs by using the select all method, changing the TXDrawingControl.Selection.Shapes property or selecting shapes manually by the built-in mouse interface . The event handler receives an argument of type ShapeEventArgs containing data related to this event.

Syntax

public event ShapeEventHandler ShapeSelected;

Examples

The following example records useful context when shape selected occurs.

tXDrawingControl.ShapeSelected += (sender, e) =>
{
    Console.WriteLine($"Shape Selected at {DateTime.Now:u}");
};