IDropHandler
trait · ferroui-xaml-interactions-draganddrop · v0.5.0
trait IDropHandler
Defines callbacks for handling drag-and-drop operations.
sender is the drop target (an untyped value holding the object), source_context the data
dragged and target_context the context of the target.
Members
enter
fn enter(self: &Self, sender: Option<&BoxedValue>, e: &DragEventArgs, source_context: Option<&BoxedValue>, target_context: Option<&BoxedValue>)
Called when a drag enters the target.
over
fn over(self: &Self, sender: Option<&BoxedValue>, e: &DragEventArgs, source_context: Option<&BoxedValue>, target_context: Option<&BoxedValue>)
Called repeatedly as the drag moves over the target.
drop
fn drop(self: &Self, sender: Option<&BoxedValue>, e: &DragEventArgs, source_context: Option<&BoxedValue>, target_context: Option<&BoxedValue>)
Called when the drag is dropped on the target.
leave
fn leave(self: &Self, sender: Option<&BoxedValue>, e: &RoutedEventArgs)
Called when the drag leaves the target.
validate
fn validate(self: &Self, sender: Option<&BoxedValue>, e: &DragEventArgs, source_context: Option<&BoxedValue>, target_context: Option<&BoxedValue>, state: Option<&BoxedValue>) -> bool
Validates whether the drag can be executed.
execute
fn execute(self: &Self, sender: Option<&BoxedValue>, e: &DragEventArgs, source_context: Option<&BoxedValue>, target_context: Option<&BoxedValue>, state: Option<&BoxedValue>) -> bool
Executes the drop logic.
cancel
fn cancel(self: &Self, sender: Option<&BoxedValue>, e: &RoutedEventArgs)
Cancels the drag operation.
Trait implementations
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.