# TextFrameCollection.DeactivateItem Method

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

- **Product:** TX Text Control .NET Server
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 13.0
- **Namespace:** `TXTextControl`
- **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 > TextFrameCollection.DeactivateItem Method
- **581 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframecollection/deactivateitem-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframecollection/deactivateitem-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-server/reference/txtextcontrol/textframecollection/deactivateitem-method/llms-full.txt

---

### Description

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

### Syntax

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

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

### Return Value

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

### Examples

The following example works with text frames in the current document by using `TextFrameCollection.DeactivateItem`.

```csharp
TextFrameCollection textFrameCollection = textControl.TextFrames;
textFrameCollection.Add(new TextFrame(new System.Drawing.Size(3000, 1200)) { Name = "Callout", ID = 100 }, TextFrameInsertionMode.DisplaceText);

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

```vbnet
Dim textFrameCollection As TextFrameCollection = textControl.TextFrames
textFrameCollection.Add(New TextFrame(New System.Drawing.Size(3000, 1200)) With { .Name = "Callout", .ID = 100 }, TextFrameInsertionMode.DisplaceText)

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

---

## Nearby

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