# TXDrawingControl.AdaptBounds Event

> 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.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Event
- **Introduced:** 23.0
- **Namespace:** `TXTextControl.Drawing`
- **Package:** `TXTextControl.TextControl.WinForms.SDK` (assembly `TXDrawing.Windows.Forms.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDrawing.Windows.Forms.dll` from the setup
- **Path:** TX Text Control .NET for Windows Forms > Reference > TXTextControl.Drawing > TXDrawingControl.AdaptBounds Event
- **510 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/adaptbounds-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/adaptbounds-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/adaptbounds-event/llms-full.txt

---

### Description

Indicates that the visible bounds of the displayed [shapes](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/shapes-property/llms-full.txt) have been changed (by changing the shape's [angle](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/shape/angle-property/llms-full.txt), [outline width](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/shape/shapeoutline-property/llms-full.txt), yellow adjust rectangles or the control's [border width](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/borderwidth-property/llms-full.txt)) in so far that the [control](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/llms-full.txt) requires an [update of its bounds](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/sizetocontent-method/llms-full.txt). The event always raises if the visible bounds exceed the control's bounds. If [IsCanvasVisible](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/iscanvasvisible-property/llms-full.txt) 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

```csharp
public event EventHandler AdaptBounds;
```

```vbnet
Public Event AdaptBounds As EventHandler
```

### Examples

The following example records useful context when adapt bounds occurs.

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

```vbnet
AddHandler tXDrawingControl.AdaptBounds,
    Sub(sender, e)
        Console.WriteLine($"Adapt Bounds at {DateTime.Now:u}")
    End Sub
```

---

## Nearby

- **Previous:** [TXDrawingControl Class](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/llms-full.txt)
- **Next:** [TXDrawingControl.BackColor Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcontrol/backcolor-property/llms-full.txt)
