# DrawingCollection Class

> DrawingCollection class in the TX Sheet Control .NET API: Worksheet-scoped server API contract; requests retain document identity and cancellation semantics.

- **Product:** TX Sheet Control
- **Section:** Documentation
- **Kind:** Class
- **Namespace:** `TXTextControl.TXSheetControl.Server`
- **Package:** `TXTextControl.TXSheetControl.Server` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Package:** `TXTextControl.TXSheetControl.Blazor` (assembly `TXTextControl.TXSheetControl.Api.dll`, from the private NuGet feed or the supplied NuGet folder)
- **Inherits:** `TXTextControl.TXSheetControl.Server.DocumentObject`
- **Path:** TX Sheet Control > API Reference > .NET API > TXTextControl.TXSheetControl.Server > DrawingCollection Class
- **1055 words**
- **Web URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/
- **LLMs URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/llms-full.txt

---

Worksheet-scoped server API contract; requests retain document identity and cancellation semantics.

### Syntax

```csharp
public class DrawingCollection
```

### Members

#### Methods

| Method | Description |
|---|---|
| [AddPictureAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/addpictureasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [AddShapeAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/addshapeasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [AlignAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/alignasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [AtAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/atasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetAllAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/getallasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/getasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetByIdAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/getbyidasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GetCountAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/getcountasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [GroupAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/groupasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |
| [RemoveAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/removeasync-method/llms-full.txt) | Performs an operation on this document without activating another worksheet. |

### Examples

Build a small report using this document API and return its PDF bytes. Pass a live control with a fresh workbook; the caller owns its lifetime.

```csharp
using TXTextControl.TXSheetControl.Server;

async Task<byte[]> CreateDrawingCollectionReportAsync(ServerSheetControl control)
{
    var book = control.Workbook;
    var sheet = await book.Sheets.AtAsync(0);
    var drawing = await sheet.Drawings.AddShapeAsync(new { type = "rectangle", name = "Invoice heading", text = "Invoice", anchor = new { cell = "F2" }, size = new { width = 240, height = 80 }, fill = "#e5eef4" });
    var drawingCollection = sheet.Drawings;
    return await control.SaveAsync(StreamType.PDF);
}
```

### See Also

- [TXTextControl.TXSheetControl.Server Namespace](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/llms-full.txt)
- [Pictures and Shapes](https://docs.textcontrol.com/tx-sheet-control/spreadsheets/pictures-shapes/llms-full.txt)
- [AddBarcodeAsync](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/addbarcodeasync-method/llms-full.txt) — Inserts a movable barcode or QR code. Missing Source and Value reads the anchor cell.

---

## In This Section

- [DrawingCollection.AddBarcodeAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/addbarcodeasync-method/llms-full.txt): DrawingCollection.AddBarcodeAsync method in the TX Sheet Control .NET API: Inserts a movable barcode or QR code. Missing Source and Value reads the anchor cell.
- [DrawingCollection.AddPictureAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/addpictureasync-method/llms-full.txt): DrawingCollection.AddPictureAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [DrawingCollection.AddShapeAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/addshapeasync-method/llms-full.txt): DrawingCollection.AddShapeAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [DrawingCollection.AlignAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/alignasync-method/llms-full.txt): DrawingCollection.AlignAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [DrawingCollection.AtAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/atasync-method/llms-full.txt): DrawingCollection.AtAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [DrawingCollection.GetAllAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/getallasync-method/llms-full.txt): DrawingCollection.GetAllAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [DrawingCollection.GetAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/getasync-method/llms-full.txt): DrawingCollection.GetAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [DrawingCollection.GetByIdAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/getbyidasync-method/llms-full.txt): DrawingCollection.GetByIdAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [DrawingCollection.GetCountAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/getcountasync-method/llms-full.txt): DrawingCollection.GetCountAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [DrawingCollection.GroupAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/groupasync-method/llms-full.txt): DrawingCollection.GroupAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.
- [DrawingCollection.RemoveAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/removeasync-method/llms-full.txt): DrawingCollection.RemoveAsync method in the TX Sheet Control .NET API: Performs an operation on this document without activating another worksheet.

---

## Nearby

- **Previous:** [DrawingAnchor.OffsetY Property](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawinganchor/offsety-property/llms-full.txt)
- **Next:** [DrawingCollection.AddPictureAsync Method](https://docs.textcontrol.com/tx-sheet-control/reference/dotnet-api/txtextcontrol-txsheetcontrol-server/drawingcollection/addpictureasync-method/llms-full.txt)
