pub struct DragDrop;Expand description
Defines the attached property and the routed events of drag-and-drop, and starts drag-and-drop operations.
Implementations§
Source§impl DragDrop
impl DragDrop
Sourcepub fn drag_enter_event() -> &'static RoutedEvent<DragEventArgs>
pub fn drag_enter_event() -> &'static RoutedEvent<DragEventArgs>
Event which is raised, when a drag-and-drop operation enters the element.
Sourcepub fn drag_leave_event() -> &'static RoutedEvent<DragEventArgs>
pub fn drag_leave_event() -> &'static RoutedEvent<DragEventArgs>
Event which is raised, when a drag-and-drop operation leaves the element.
Sourcepub fn drag_over_event() -> &'static RoutedEvent<DragEventArgs>
pub fn drag_over_event() -> &'static RoutedEvent<DragEventArgs>
Event which is raised, when a drag-and-drop operation is updated while over the element.
Sourcepub fn drop_event() -> &'static RoutedEvent<DragEventArgs>
pub fn drop_event() -> &'static RoutedEvent<DragEventArgs>
Event which is raised, when a drag-and-drop operation should complete over the element.
Source§impl DragDrop
impl DragDrop
Sourcepub fn allow_drop_property() -> &'static AttachedProperty<bool>
pub fn allow_drop_property() -> &'static AttachedProperty<bool>
Defines the AllowDrop attached property: whether the element
can be the target of a drag-and-drop operation. It is inherited.
Source§impl DragDrop
impl DragDrop
Sourcepub fn get_allow_drop(interactive: &Interactive) -> bool
pub fn get_allow_drop(interactive: &Interactive) -> bool
Gets a value indicating whether the given element can be used as the target of a drag-and-drop operation.
Sourcepub fn set_allow_drop(interactive: &Interactive, value: bool)
pub fn set_allow_drop(interactive: &Interactive, value: bool)
Sets a value indicating whether the given element can be used as the target of a drag-and-drop operation.
Sourcepub fn add_drag_enter_handler(
element: &Interactive,
handler: impl Fn(&Interactive, &DragEventArgs) + 'static,
) -> RoutedEventHandlerToken
pub fn add_drag_enter_handler( element: &Interactive, handler: impl Fn(&Interactive, &DragEventArgs) + 'static, ) -> RoutedEventHandlerToken
Adds a handler for the DragEnter attached event.
Sourcepub fn remove_drag_enter_handler(
element: &Interactive,
handler: RoutedEventHandlerToken,
)
pub fn remove_drag_enter_handler( element: &Interactive, handler: RoutedEventHandlerToken, )
Removes a handler for the DragEnter attached event.
Sourcepub fn add_drag_leave_handler(
element: &Interactive,
handler: impl Fn(&Interactive, &DragEventArgs) + 'static,
) -> RoutedEventHandlerToken
pub fn add_drag_leave_handler( element: &Interactive, handler: impl Fn(&Interactive, &DragEventArgs) + 'static, ) -> RoutedEventHandlerToken
Adds a handler for the DragLeave attached event.
Sourcepub fn remove_drag_leave_handler(
element: &Interactive,
handler: RoutedEventHandlerToken,
)
pub fn remove_drag_leave_handler( element: &Interactive, handler: RoutedEventHandlerToken, )
Removes a handler for the DragLeave attached event.
Sourcepub fn add_drag_over_handler(
element: &Interactive,
handler: impl Fn(&Interactive, &DragEventArgs) + 'static,
) -> RoutedEventHandlerToken
pub fn add_drag_over_handler( element: &Interactive, handler: impl Fn(&Interactive, &DragEventArgs) + 'static, ) -> RoutedEventHandlerToken
Adds a handler for the DragOver attached event.
Sourcepub fn remove_drag_over_handler(
element: &Interactive,
handler: RoutedEventHandlerToken,
)
pub fn remove_drag_over_handler( element: &Interactive, handler: RoutedEventHandlerToken, )
Removes a handler for the DragOver attached event.
Sourcepub fn add_drop_handler(
element: &Interactive,
handler: impl Fn(&Interactive, &DragEventArgs) + 'static,
) -> RoutedEventHandlerToken
pub fn add_drop_handler( element: &Interactive, handler: impl Fn(&Interactive, &DragEventArgs) + 'static, ) -> RoutedEventHandlerToken
Adds a handler for the Drop attached event.
Sourcepub fn remove_drop_handler(
element: &Interactive,
handler: RoutedEventHandlerToken,
)
pub fn remove_drop_handler( element: &Interactive, handler: RoutedEventHandlerToken, )
Removes a handler for the Drop attached event.
Sourcepub fn do_drag_drop_async(
trigger_event: &PointerPressedEventArgs,
data_transfer: Rc<dyn IDataTransfer>,
allowed_effects: DragDropEffects,
) -> LocalBoxFuture<DragDropEffects>
pub fn do_drag_drop_async( trigger_event: &PointerPressedEventArgs, data_transfer: Rc<dyn IDataTransfer>, allowed_effects: DragDropEffects, ) -> LocalBoxFuture<DragDropEffects>
Starts a dragging operation with the given data transfer and returns its result.
trigger_event is the pointer pressed event that triggered the
operation. data_transfer is automatically disposed when the
operation completes: it must NOT be disposed by the caller.
allowed_effects are the effects the source allows.
Trait Implementations§
Source§impl MarkupTyped for DragDrop
impl MarkupTyped for DragDrop
Source§const MARKUP: &'static MarkupType
const MARKUP: &'static MarkupType
Auto Trait Implementations§
impl Freeze for DragDrop
impl RefUnwindSafe for DragDrop
impl Send for DragDrop
impl Sync for DragDrop
impl Unpin for DragDrop
impl UnsafeUnpin for DragDrop
impl UnwindSafe for DragDrop
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> ClassDefaults for Twhere
T: ?Sized,
impl<T> ClassDefaults for Twhere
T: ?Sized,
Source§fn static_constructor()
fn static_constructor()
affects_render, metadata
overrides). Read more