# DrawingCollection.DeactivateItem Method

> Deactivates the activated drawing and sets the input focus back to the text part that contains the drawing.

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 23.0
- **Namespace:** `TXTextControl.DataVisualization`
- **Package:** `TXTextControl.TextControl.Core.SDK` (assembly `TXTextControl.Core.dll`, from the private NuGet feed or Text Control Offline Packages)
- **Package:** `TXTextControl.TextControl.ASP.SDK` (assembly `TXTextControl.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.dll` from the setup
- **Path:** TX Text Control .NET Server > Reference > TXTextControl.DataVisualization > DrawingCollection.DeactivateItem Method
- **319 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/drawingcollection/deactivateitem-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/drawingcollection/deactivateitem-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/drawingcollection/deactivateitem-method/llms-full.txt

---

### Description

Deactivates the activated drawing and sets the input focus back to the text part that contains the drawing.

### Syntax

```csharp
public bool DeactivateItem();
```

```vbnet
Public Function DeactivateItem() As Boolean
```

### Return Value

The return value is true, if a drawing has been deactivated. Otherwise it is false.

### Examples

The following example deactivates the current item in the drawing collection.

```csharp
if (drawingCollection.DeactivateItem())
{
    Console.WriteLine("Deactivate Item completed successfully.");
}
```

```vbnet
If drawingCollection.DeactivateItem() Then
    Console.WriteLine("Deactivate Item completed successfully.")
End If
```

---

## Nearby

- **Previous:** [DrawingCollection.CopyTo Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/drawingcollection/copyto-method/llms-full.txt)
- **Next:** [DrawingCollection.GetActivatedItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol-datavisualization/drawingcollection/getactivateditem-method/llms-full.txt)
