TX Text Control .NET Server

ShapeDeleted Event

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

Description

Occurs when a shape has been deleted from the TXDrawingCore's shapes collection. It occurs by cutting or using the shape collection's Remove, RemoveAt or Clear method. The event handler receives an argument of type ShapeEventArgs containing data related to this event.

Syntax

public event ShapeEventHandler ShapeDeleted;

Examples

The following example records useful context when shape deleted occurs.

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