TX Text Control .NET for WPF

DocumentTargetEventArgs Class

Class|Introduced in 28.0
Namespace
TXTextControl
Package
TXTextControl.TextControl.WPF.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.dll
Install
dotnet add package TXTextControl.TextControl.WPF.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.dll from the setup.
Inherits
  1. EventArgs
  2. DocumentTargetEventArgs

Description

The DocumentTargetEventArgs class provides data for the DocumentTargetCreated and DocumentTargetDeleted events. When subtextpart is deleted, the DocumentTarget object provided with the event data has the following valid properties: TargetName, Deleteable, ID and Name. All other properties are undefined.

Syntax

public class DocumentTargetEventArgs : EventArgs

Examples

The following example uses DocumentTargetEventArgs.DocumentTarget while handling DocumentTargetCreated.

textControl.DocumentTargetCreated += (_, e) =>
{
    e.DocumentTarget?.ScrollTo();
};

Members

Properties

PropertyDescription
DocumentTargetGets an object that represents the document target which causes the event. It is of the type DocumentTarget.