# DrawingCollection.GetActivatedItem Method

> Returns the currently activated drawing. An activated drawing has the input focus and can be edited. The method returns null, if no drawing is activated.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Method
- **Introduced:** 23.0
- **Namespace:** `TXTextControl.DataVisualization`
- **Package:** `TXTextControl.TextControl.WPF.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 for WPF > Reference > TXTextControl.DataVisualization > DrawingCollection.GetActivatedItem Method
- **328 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/drawingcollection/getactivateditem-method/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/drawingcollection/getactivateditem-method/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/drawingcollection/getactivateditem-method/llms-full.txt

---

### Description

Returns the currently activated drawing. An activated drawing has the input focus and can be edited. The method returns null, if no drawing is activated.

### Syntax

```csharp
public DrawingFrame GetActivatedItem();
```

```vbnet
Public Function GetActivatedItem() As DrawingFrame
```

### Return Value

The return value is null, if an activated drawing could not be found. Otherwise, it is an object of the type [DataVisualization.DrawingFrame](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/drawingframe/llms-full.txt).

### Examples

The following example retrieves activated item from the drawing collection.

```csharp
var result = drawingCollection.GetActivatedItem();
Console.WriteLine($"Get Activated Item result: {result}");
```

```vbnet
Dim result = drawingCollection.GetActivatedItem()
Console.WriteLine($"Get Activated Item result: {result}")
```

---

## Nearby

- **Previous:** [DrawingCollection.DeactivateItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/drawingcollection/deactivateitem-method/llms-full.txt)
- **Next:** [DrawingCollection.GetItem Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-datavisualization/drawingcollection/getitem-method/llms-full.txt)
