Skip to content

ChartDraggableLocationChangedEventArgs

class cAlgo.API Since 5.2

DesktopCLICloud

Provides data for LocationChanged event of ChartDraggable.

Environment behaviour

CLI — not supported. Never raised in the CLI: the events that pass it never fire there (ChartDraggable.LocationChanged).

Cloud — not supported. Never raised in the cloud: the events that pass it never fire there (ChartDraggable.LocationChanged).

Definition

public class ChartDraggableLocationChangedEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

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

private void OnDraggableLocationChanged(ChartDraggableLocationChangedEventArgs args)
{
    Print("Draggable {0} moved to X: {1}, Y: {2}", args.Draggable.Id, args.Draggable.X, args.Draggable.Y);
}
def on_start(self):
    draggable = api.Chart.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

Name Description
DraggableDesktopCLICloudChartDraggable Gets the draggable.

See also