TX Text Control .NET for Windows Forms

CommentStateChanged Event

Event|Introduced in 30.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 the state of a comment alters from active to inactive or vice versa. A piece of text with an inactive comment is not highlighted and is not retrieved through the CommentCollection.GetItem method. The event handler receives an argument of type CommentEventArgs containing data related to this event.

Syntax

public event CommentEventHandler CommentStateChanged;

Examples

The following example records useful context when comment state changed occurs.

textControl.CommentStateChanged += (sender, e) =>
{
    Console.WriteLine($"Comment State Changed at {DateTime.Now:u}");
};