TX Text Control .NET for Windows Forms

DrawingCreated Event

Event|Introduced in 23.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WinForms.SDK as TXTextControl.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Occurs when a new drawing has been created. It occurs, when a drawing has been inserted in the document via the clipboard and when a file containing drawings has been loaded. It does not occur, when a drawing has been added with the DrawingCollection.Add method. The event handler receives an argument of type DrawingEventArgs containing data related to this event.

Syntax

public event DrawingEventHandler DrawingCreated;

Examples

The following example records useful context when drawing created occurs.

textControl.DrawingCreated += (sender, e) =>
{
    Console.WriteLine($"Drawing Created at {DateTime.Now:u}");
};