Expand description
ferroui-xaml-interactions-draganddrop
Drag and drop behaviors, ported from the Xaml.Behaviors.Interactions.DragAndDrop project of
Xaml.Behaviors (see NOTICE.md):
- drag sources that start a drag and drop of the system with context data
(
ContextDragBehavior,ContextDragWithDirectionBehavior,PanelDragBehavior) or with data of a type (TypedDragBehavior), notifying anIDragHandler; - drop targets that hand the drag events to an
IDropHandler(ContextDropBehavior), or execute a command (FilesDropBehavior,TextDropBehavior,PanelDropBehavior,ContentControlFilesDropBehavior,DragDropCommandsBehavior); the base of custom drop handlers (DropHandlerBase,BaseTreeViewDropHandler); - the preview of dragged files (
FilesPreviewBehavior,AddPreviewFilesAction); - a managed drag and drop inside the application, with a preview window
(
ManagedContextDragBehavior,ManagedContextDropBehavior,ManagedDragDropService,DragPreviewService).
The styles of the reference (Styles.xaml: the adorners of the tree view items a drag passes
over) are compiled by the build of the crate; an application includes them with
<StyleInclude Source="ferres://FerroUI.Xaml.Interactions.DragAndDrop/Styles.xaml" />.
The namespace of the crate is FerroUI.Xaml.Interactions.DragAndDrop (and
FerroUI.Xaml.Interactions.DragAndDrop.Controls for the preview window), the first mapped into
the default XML namespace of the framework: documents name its types without a prefix once
register_types ran.
Modules§
- values
- Not from the reference: the untyped values the behaviors pass to handlers, actions and
commands (the
objectarguments of the reference).
Structs§
- AddPreview
Files Action - Adds the files of a drag event (the parameter of the action) to the items of an
ItemsControl: theitems_control, or else the sender. - Content
Control Files Drop Behavior - Behavior that handles file drop operations for
ContentControl: while files are dragged over the control it showscontent_during_dragonbackground_during_drag, and the command of the behavior executes with the dropped files (seeFilesDropBehavior). - Context
Drag Behavior - Behavior that starts a drag operation using the associated context data, and notifies its
handlerbefore and after the drag. - Context
Drag Behavior Base - Behavior base class that starts a drag operation using the associated context data: the
context, or else the data context of the associated control, travels with the drag (by its key in the drag data) to the drop behaviors of this crate. - Context
Drag Behavior BaseV Table - The virtual table of the class.
- Context
Drag With Direction Behavior - Behavior that starts drag and drop with information about drag direction: the drag data holds
"up"or"down", as the pointer moved up or down to start the drag. - Context
Drop Behavior - Behavior that enables dropping context data onto the associated control using a predefined
IDropHandler. - Context
Drop Behavior Base - Behavior base class that enables dropping context data onto the associated control: the drag
events of the control go to the members of
ContextDropBehaviorBaseImpl, with the context of the drag source (found by its key in the drag data) and thecontextof the target, or else the data context of the control. - Context
Drop Behavior BaseV Table - The virtual table of the class.
- Drag
AndDrop Events Behavior - Base class for behaviors that respond to drag-and-drop events: the drag events of the
target_control, or else of the associated control, go to the members ofDragAndDropEventsBehaviorImpl. - Drag
AndDrop Events BehaviorV Table - The virtual table of the class.
- Drag
Drop Commands Behavior - Behavior that exposes commands for drag-and-drop events: each drag event executes its command
with the event args (or no parameter), and the
can_execute_*properties tell whether each command can execute. - Drag
Preview Service - Provides a lightweight preview window shown during a managed drag operation.
- Drag
Preview Window - Lightweight always-on-top window used to display drag preview content: transparent, non-interactive, topmost and sized to its content.
- Drop
Behavior Base - Base class for behaviors that respond to drag-and-drop events: the drag events of the
associated control go to the
handler, and the deriving class executes the command of the behavior withexecute_command. - Files
Drop Behavior - Behavior that handles file drop operations: the command of the behavior executes with the dropped files.
- Files
Preview Behavior - Behavior that collects the files dragged over the associated control: the
preview_fileshold them while the drag is over the control. - Managed
Context Drag Behavior - Behavior that initiates an in-process managed drag with an optional preview window.
- Managed
Context Drop Args - Arguments used by managed drop handlers to describe the drop context.
- Managed
Context Drop Behavior - Drop target behavior that integrates with
ManagedDragDropService. - Managed
Drag Drop Service - Provides a lightweight, managed drag-drop state shared within the application.
- Panel
Drag Behavior - Behavior that starts a drag operation for a control so it can be moved between panels. The control itself is used as the drag context.
- Panel
Drop Behavior - Behavior that allows dropping controls dragged with
PanelDragBehavior: the dragged control moves to the panel of the behavior (to the drop position in a canvas). - Text
Drop Behavior - Behavior that handles text drop operations: the command of the behavior executes with the dropped text.
- Typed
Drag Behavior - Behavior that initiates a drag operation for a specific data type, and notifies its
handlerbefore and after the drag. - Typed
Drag Behavior Base - Behavior base class that initiates a drag operation for a specific data type: the press starts
a drag only over an element whose data context is of the
data_type. - Typed
Drag Behavior BaseV Table - The virtual table of the class.
Statics§
- ASSEMBLY
- What this crate states about itself for markup: its assembly name and the namespace the XML namespace of the framework maps to.
Traits§
- Base
Tree View Drop Handler - Provides base drag-and-drop visuals and validation helpers for
TreeViewscenarios: while an item is dragged over a tree view, the item under the pointer gets the classDraggingUporDraggingDown(the half of the item the pointer is over), orTargetHighlightwhen the dragged item would move to another parent (the styles document of the crate styles these classes). - Context
Drag Behavior Base Impl - The overridable members introduced by the class.
- Context
Drag Behavior Base Impl Ext - Access to the base implementations of the overridable members.
- Context
Drop Behavior Base Impl - The overridable members introduced by the class.
- Context
Drop Behavior Base Impl Ext - Access to the base implementations of the overridable members.
- Drag
AndDrop Events Behavior Impl - The overridable members introduced by the class.
- Drag
AndDrop Events Behavior Impl Ext - Access to the base implementations of the overridable members.
- Drop
Handler Base - Provides helper methods for custom drop handlers.
- IDrag
Handler - Provides callbacks for drag operations.
- IDrop
Handler - Defines callbacks for handling drag-and-drop operations.
- Managed
Data Transfer Extensions - Provides helpers to retrieve managed drag-drop payloads from data transfer objects.
- Managed
Data Transfer Item Extensions - Provides helpers to retrieve managed drag-drop payloads from the items of data transfer
objects (see
ManagedDataTransferExtensions). - Typed
Drag Behavior Base Impl - The overridable members introduced by the class.
- Typed
Drag Behavior Base Impl Ext - Access to the base implementations of the overridable members.
Functions§
- register_
types - Registers the namespaces, the types, the assembly and the compiled markup of this crate (and of
the crates it is built on), and with the feature
document-assetsthe styles document as an asset. Cheap and idempotent.