Skip to content

DroppedEventArgs

class cAlgo.API Since 5.1

DesktopCLICloud

Provides data for the Dropzone Dropped event.

Environment behaviour

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

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

Definition

public class DroppedEventArgs

Namespace: cAlgo.API · Group: EventArgs

Examples

protected override void OnStart()
{
    var dropZone = new DropZone { Child = new TextBlock { Text = "Drop files here" } };
    dropZone.Dropped += OnDropZoneDropped;
    Chart.AddControl(dropZone);
}

private void OnDropZoneDropped(DroppedEventArgs args)
{
    Print("{0} file(s) dropped", args.FilePaths.Count);
}
def on_start(self):
    text_block = TextBlock()
    text_block.Text = "Drop files here"
    dropZone = DropZone()
    dropZone.Child = text_block
    dropZone.Dropped += self.on_drop_zone_dropped
    api.Chart.AddControl(dropZone)

def on_drop_zone_dropped(self, args):
    api.Print(f"{args.FilePaths.Count} file(s) dropped")

Properties

Name Description
DropZoneDesktopCLICloudDropZone Gets the Dropzone control.
FilePathsDesktopCLICloudIReadonlyList<string> Gets the dropped file paths.