TX Text Control .NET for Windows Forms

AdaptBounds Event

Event|Introduced in 23.0
Namespace
TXTextControl.Drawing
Package
TXTextControl.TextControl.WinForms.SDK as TXDrawing.Windows.Forms.dll from the private NuGet feed or Text Control Offline Packages

Description

Indicates that the visible bounds of the displayed shapes have been changed (by changing the shape's angle, outline width, yellow adjust rectangles or the control's border width) in so far that the control requires an update of its bounds. The event always raises if the visible bounds exceed the control's bounds. If IsCanvasVisible is false, AdaptBounds is also raised if considering changes lead to a decreasing of the visible shape bounds. The event handler receives an argument of type EventArgs containing data related to this event.

Syntax

public event EventHandler AdaptBounds;

Examples

The following example records useful context when adapt bounds occurs.

tXDrawingControl.AdaptBounds += (sender, e) =>
{
    Console.WriteLine($"Adapt Bounds at {DateTime.Now:u}");
};