TX Text Control .NET for WPF

ShapeCreated Event

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

Description

Occurs when a new shape has been created. It occurs, when a shape has been inserted in the TXDrawingCore's shapes collection by pasting or using the shape collection's Add method. The event handler receives an argument of type ShapeEventArgs containing data related to this event.

Syntax

public event ShapeEventHandler ShapeCreated;

Examples

The following example records useful context when shape created occurs.

tXDrawingCore.ShapeCreated += (sender, e) =>
{
    Console.WriteLine($"Shape Created at {DateTime.Now:u}");
};