DroppedEventArgs.FilePaths
property · DroppedEventArgs · cAlgo.API Since 5.1
DesktopCLICloud
Gets the dropped file paths.
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 IReadonlyList<string> FilePaths {get;}
droppedEventArgs.FilePaths: IReadonlyList[str]
Returns IReadonlyList<string>
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)
{
foreach (var filePath in args.FilePaths)
Print("Dropped file: {0}", filePath);
}
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):
for filePath in args.FilePaths:
api.Print(f"Dropped file: {filePath}")