# TXDrawingCore.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 canvas' border width) in so far that the canvas requires an update of its bounds. The event always raises if the visible bounds exceed the canvas' 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 WPF
- **Section:** Reference
- **Kind:** Event
- **Introduced:** 33.0
- **Namespace:** `TXTextControl.Drawing`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXDrawing.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDrawing.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.Drawing > TXDrawingCore.AdaptBounds Event
- **499 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/adaptbounds-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/adaptbounds-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/adaptbounds-event/llms-full.txt

---

### Description

Indicates that the visible bounds of the displayed [shapes](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/shapes-property/llms-full.txt) have been changed (by changing the shape's [angle](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shape/angle-property/llms-full.txt), [outline width](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shape/shapeoutline-property/llms-full.txt), yellow adjust rectangles or the canvas' [border width](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/borderwidth-property/llms-full.txt)) in so far that the [canvas](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/llms-full.txt) requires an [update of its bounds](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/sizetocontent-method/llms-full.txt). The event always raises if the visible bounds exceed the canvas' bounds. If [IsCanvasVisible](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/txdrawingcore/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
tXDrawingCore.AdaptBounds += (sender, e) =>
{
    Console.WriteLine($"Adapt Bounds at {DateTime.Now:u}");
};
```

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

---

## Nearby

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