TX Text Control .NET for WPF

CommentEventArgs Class

Class|Introduced in 30.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. CommentEventArgs

Description

The CommentEventArgs class provides data for the CommentCreated, CommentDeleted, CommentedTextEntered, CommentedTextLeft, CommentChanged and CommentStateChanged events. When a comment is deleted, the CommentedText object provided with the event data has the following valid properties: HighlightColor, HighlightMode, Comment, CreationTime, ID and UserName. All other properties are undefined.

Syntax

public class CommentEventArgs : EventArgs

Examples

The following example uses CommentEventArgs.CommentedText while handling CommentCreated.

textControl.CommentCreated += (_, e) =>
{
    e.CommentedText?.ScrollTo();
};

Members

Properties

PropertyDescription
CommentedTextGets an object that represents the commented text. It is of the type CommentedText.