# ServerTextControl.TextFrameCreated Event

> Occurs when a new text frame has been created. It occurs for each text frame if a file containing text frames has been loaded. It does not occur if an text frame has been added with the TextFrameCollection.Add method. The event handler receives an argument of type TextFrameEventArgs containing data related to this event.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Event
- **Introduced:** 12.0
- **Namespace:** `TXTextControl`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXTextControl.Server.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXTextControl.Server.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl > ServerTextControl.TextFrameCreated Event
- **369 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/textframecreated-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/textframecreated-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/textframecreated-event/llms-full.txt

---

### Description

Occurs when a new text frame has been created. It occurs for each text frame if a file containing text frames has been loaded. It does not occur if an text frame has been added with the [TextFrameCollection.Add](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textframecollection/add-method/llms-full.txt) method. The event handler receives an argument of type [TextFrameEventArgs](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/textframeeventargs/llms-full.txt) containing data related to this event.

### Syntax

```csharp
public event TextFrameEventHandler TextFrameCreated;
```

```vbnet
Public Event TextFrameCreated As TextFrameEventHandler
```

### Examples

The following example records useful context when text frame created occurs.

```csharp
textControl.TextFrameCreated += (sender, e) =>
{
    Console.WriteLine($"Text Frame Created at {DateTime.Now:u}");
};
```

```vbnet
AddHandler textControl.TextFrameCreated,
    Sub(sender, e)
        Console.WriteLine($"Text Frame Created at {DateTime.Now:u}")
    End Sub
```

---

## Nearby

- **Previous:** [ServerTextControl.TextFields Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/textfields-property/llms-full.txt)
- **Next:** [ServerTextControl.TextFrameDeleted Event](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol/servertextcontrol/textframedeleted-event/llms-full.txt)
