# TXDrawingControl.ViewChanged Event

> Occurs when UI manipulations such as shape moving or selection changing have caused the view to change. The event handler receives an argument of type ViewChangedEventArgs containing data related to this event.

- **Product:** TX Text Control .NET for WPF
- **Section:** Reference
- **Kind:** Event
- **Introduced:** 23.0
- **Namespace:** `TXTextControl.WPF.Drawing`
- **Package:** `TXTextControl.TextControl.WPF.SDK` (assembly `TXDrawing.WPF.dll`, from the private NuGet feed or Text Control Offline Packages)
- **.NET Framework:** reference `TXDrawing.WPF.dll` from the setup
- **Path:** TX Text Control .NET for WPF > Reference > TXTextControl.WPF.Drawing > TXDrawingControl.ViewChanged Event
- **343 words**
- **Web URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-drawing/txdrawingcontrol/viewchanged-event/
- **LLMs URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-drawing/txdrawingcontrol/viewchanged-event/llms.txt
- **LLMs-Full URL:** https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-drawing/txdrawingcontrol/viewchanged-event/llms-full.txt

---

### Description

Occurs when UI manipulations such as [shape](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/shape/llms-full.txt) moving or selection changing have caused the view to change. The event handler receives an argument of type [ViewChangedEventArgs](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-drawing/viewchangedeventargs/llms-full.txt) containing data related to this event.

### Syntax

```csharp
public event ViewChangedEventHandler ViewChanged;
```

```vbnet
Public Event ViewChanged As ViewChangedEventHandler
```

### Examples

The following example records useful context when view changed occurs.

```csharp
tXDrawingControl.ViewChanged += (sender, e) =>
{
    Console.WriteLine($"View Changed at {DateTime.Now:u}");
};
```

```vbnet
AddHandler tXDrawingControl.ViewChanged,
    Sub(sender, e)
        Console.WriteLine($"View Changed at {DateTime.Now:u}")
    End Sub
```

---

## Nearby

- **Previous:** [TXDrawingControl.Undo Method](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-drawing/txdrawingcontrol/undo-method/llms-full.txt)
- **Next:** [TXDrawingControl.ZoomFactor Property](https://docs.textcontrol.com/tx-text-control-dotnet-wpf/reference/txtextcontrol-wpf-drawing/txdrawingcontrol/zoomfactor-property/llms-full.txt)
