Avalonia solo in codiceEnglish

API › RAVAL

RDrop class

Il riferimento e' in inglese: viene dai commenti del sorgente di RAVAL, che dalla 2.0 ha nomi e commenti in inglese.

public sealed class RDrop

A control that accepts dropped files or texts.

Metodi

static RDrop Files(Control target, Action<List<string>> dropped, params string[] patterns)

The files dropped on the control go to the method, as paths: only those that match one of the patterns («*.csv»; none: all).

static RDrop Text(Control target, Action<string> dropped)

A text dropped on the control (from an editor, a browser) goes to the method.

bool Accepts(string path)

Whether a file name matches the patterns (true if there are none).

bool Deliver(IEnumerable<string> paths)

Gives paths to the method as a drop would: those that match, and only if one does (for the tests, or a «open» that reuses the drop).

void Stop()

The control no longer accepts drops.