DocumentSizeChanged Event
- Namespace
TXTextControl.ServerVisualisation
- Package
TXTextControl.asTextControl. Core. SDK TXTextControl.from the private NuGet feed or Text Control Offline PackagesServer. Core. dll
- Also in
TXTextControl.asTextControl. ASP. SDK 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;Public Event DocumentSizeChanged As DocumentSizeChangedEventHandlerExamples
The following example records useful context when document size changed occurs.
textViewGenerator.DocumentSizeChanged += (sender, e) =>
{
Console.WriteLine($"Width: {e.Width}");
};AddHandler textViewGenerator.DocumentSizeChanged,
Sub(sender, e)
Console.WriteLine($"Width: {e.Width}")
End Sub