TX Text Control .NET for WPF

CannotTrackChange Event

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

Description

Determines how to handle a change of the document that cannot be added to the list of tracked changes. Complex table layout changes, such as deleting a table column or merging table cells cannot be tracked. The default handling shows a MessageBox asking the end-user whether the change of the document should be performed. The event handler receives an argument of type CannotTrackChangeEventArgs containing data related to this event. Using the CannotTrackChangeEventArgs.Handled and the CannotTrackChangeEventArgs.Cancel property the default handling can be changed.

Syntax

public event CannotTrackChangeEventHandler CannotTrackChange;

Examples

The following example records useful context when cannot track change occurs.

textControl.CannotTrackChange += (sender, e) =>
{
    Console.WriteLine($"Handled: {e.Handled}");
};