TX Text Control .NET Server

DocumentSizeChanged Event

Event|Introduced in 21.0
Namespace
TXTextControl.ServerVisualisation
Package
TXTextControl.TextControl.Core.SDK as TXTextControl.Server.Core.dll from the private NuGet feed or Text Control Offline Packages
Also in
TXTextControl.TextControl.ASP.SDK as TXTextControl.Server.dll

Description

Occurs when the size of the document has been changed. When an external scroll interface has been implemented, this event can be used to adapt the scroll bar range. The event handler receives an argument of type DocumentSizeChangedEventArgs containing data related to this event.

Syntax

public event DocumentSizeChangedEventHandler DocumentSizeChanged;

Examples

The following example records useful context when document size changed occurs.

textViewGenerator.DocumentSizeChanged += (sender, e) =>
{
    Console.WriteLine($"Width: {e.Width}");
};