# TXDrawingCore.SizeToContent Method

> If any changes of the the displayed shapes' visible bounds require an adaption of the canvas bounds, its size and/or location is expanded respectively decreased by the considering value of the considering shape's side(s). The method returns an array of doubles which represent the effected alteration for each canvas side (left, top, right, bottom) in Twips.

- **Product:** TX Text Control .NET for Windows Forms
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 33.0
- **Namespace:** `TXTextControl.Drawing`
- **Package:** `TXTextControl.TextControl.WinForms.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 Windows Forms > Reference > TXTextControl.Drawing > TXDrawingCore.SizeToContent Method
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/sizetocontent-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/sizetocontent-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/sizetocontent-method/llms-full.txt

---

## On This Page

- [Description](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/sizetocontent-method/#description)
- [Syntax](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/sizetocontent-method/#syntax)
- [Return Value](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/sizetocontent-method/#return-value)
- [Examples](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/sizetocontent-method/#examples)

---

## Nearby

- **Previous:** [TXDrawingCore.Size Property](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/size-property/llms.txt)
- **Next:** [TXDrawingCore.Undo Method](https://docs.textcontrol.com/tx-text-control-dotnet-winforms/reference/txtextcontrol-drawing/txdrawingcore/undo-method/llms.txt)
