TableCreated Event
- Namespace
TXTextControl.WPF
- Package
TXTextControl.asTextControl. WPF. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesWPF. dll
Description
Occurs after a new table has been created as a result of a text insertion via the clipboard or when loading a document which contains a table without an identifier. It does not occur when the table is inserted with the TableInsert method or for tables that have a previously set identifier when loading a document. The event handler receives an argument of type TableEventArgs containing data related to this event.
Syntax
public event TableEventHandler TableCreated;Public Event TableCreated As TableEventHandlerExamples
The following example records useful context when table created occurs.
textControl.TableCreated += (sender, e) =>
{
Console.WriteLine($"Table Created at {DateTime.Now:u}");
};AddHandler textControl.TableCreated,
Sub(sender, e)
Console.WriteLine($"Table Created at {DateTime.Now:u}")
End SubRemarks
The TableCreated event is always fired, if a table is inserted from the clipboard and is not next to another table. If the table has an identifier, it will be kept. If a previously existent table has the same identifier, the identifier will point to the already present table.
The TableCreated event is not fired, if a table is inserted from the clipboard next to another table. The table will be merged with the existent table and the resulting table inherits the identifier from the already existent one.