---
id: "T:cAlgo.API.ApplicationDraggableLocationChangedEventArgs"
kind: "class"
namespace: "cAlgo.API"
url: "https://help.ctrader.com/ctrader-algo/references/EventArgs/ApplicationDraggableLocationChangedEventArgs/"
---

> Documentation index for agents: https://help.ctrader.com/ctrader-algo/llms.txt · machine index: https://help.ctrader.com/ctrader-algo/api.json

# ApplicationDraggableLocationChangedEventArgs (class)

Provides data for LocationChanged event of ApplicationDraggable.

Environments: Desktop supported · CLI not supported · Cloud not supported.

- CLI: Never raised in the CLI: the events that pass it never fire there (ApplicationDraggable.LocationChanged).
- Cloud: Never raised in the cloud: the events that pass it never fire there (ApplicationDraggable.LocationChanged).

## Definition

```csharp
public class ApplicationDraggableLocationChangedEventArgs
```

Available since cAlgo.API 5.2.

## Examples

C#:

```csharp
protected override void OnStart()
{
    var draggable = Application.Draggables.Add();
    draggable.Child = new TextBlock { Text = "Drag me" };
    draggable.LocationChanged += OnDraggableLocationChanged;
}

private void OnDraggableLocationChanged(ApplicationDraggableLocationChangedEventArgs args)
{
    Print("Draggable {0} moved to X: {1}, Y: {2}", args.Draggable.Id, args.Draggable.X, args.Draggable.Y);
}
```

Python:

```python
def on_start(self):
    draggable = api.Application.Draggables.Add()
    text_block = TextBlock()
    text_block.Text = "Drag me"
    draggable.Child = text_block
    draggable.LocationChanged += self.on_draggable_location_changed

def on_draggable_location_changed(self, args):
    api.Print(f"Draggable {args.Draggable.Id} moved to X: {args.Draggable.X}, Y: {args.Draggable.Y}")
```

## Properties

- `public ApplicationDraggable Draggable {get;}` — Gets the draggable. [details](https://help.ctrader.com/ctrader-algo/references/EventArgs/ApplicationDraggableLocationChangedEventArgs/Draggable/index.md)

