ManagedContextDragBehavior
struct · ferroui-xaml-interactions-draganddrop · v0.5.0
struct ManagedContextDragBehavior
Behavior that initiates an in-process managed drag with an optional preview window.
This avoids the drag and drop of the system and integrates with ManagedDragDropService:
the drop targets are ManagedContextDropBehaviors.
Members
TYPEto_refcontext_propertypreview_template_propertyhorizontal_drag_threshold_propertyvertical_drag_threshold_propertypreview_offset_propertydata_format_propertyuse_pointer_relative_preview_offset_propertypreview_opacity_propertyconstructnewcontextset_contextpreview_templateset_preview_templatehorizontal_drag_thresholdset_horizontal_drag_thresholdvertical_drag_thresholdset_vertical_drag_thresholdpreview_offsetset_preview_offsetdata_formatset_data_formatuse_pointer_relative_preview_offsetset_use_pointer_relative_preview_offsetpreview_opacityset_preview_opacity
TYPE
const TYPE: &'static $crate::TypeInfo
The runtime type of this class.
to_ref
fn to_ref(self: &Self) -> $crate::Ref<ManagedContextDragBehavior>
Returns a strong reference to this object.
context_property
fn context_property() -> &'static StyledProperty<Option<BoxedValue>>
Gets or sets the context value used as a drag payload when the drag starts.
preview_template_property
fn preview_template_property() -> &'static StyledProperty<Option<Rc<dyn IDataTemplate>>>
Gets or sets the data template used to render the drag preview window content.
horizontal_drag_threshold_property
fn horizontal_drag_threshold_property() -> &'static StyledProperty<f64>
Gets or sets the minimal horizontal distance required to start dragging.
vertical_drag_threshold_property
fn vertical_drag_threshold_property() -> &'static StyledProperty<f64>
Gets or sets the minimal vertical distance required to start dragging.
preview_offset_property
fn preview_offset_property() -> &'static StyledProperty<Point>
Gets or sets the fixed logical offset applied to the preview position. Ignored when
UsePointerRelativePreviewOffset is true and a pointer-relative offset is calculated.
data_format_property
fn data_format_property() -> &'static StyledProperty<String>
Gets or sets the data format name used to identify the payload in managed drag operations.
use_pointer_relative_preview_offset_property
fn use_pointer_relative_preview_offset_property() -> &'static StyledProperty<bool>
Gets or sets whether to compute a pointer-relative preview offset automatically.
preview_opacity_property
fn preview_opacity_property() -> &'static StyledProperty<f64>
Gets or sets the preview window opacity.
construct
fn construct() -> Self
Creates the class data; see ferroui_base::FerroObject::construct.
new
fn new() -> Ref<Self>
Creates the behavior.
context
fn context(self: &Self) -> Option<BoxedValue>
Gets or sets the context value used as a drag payload when the drag starts.
set_context
fn set_context(self: &Self, value: Option<BoxedValue>)
preview_template
fn preview_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
Gets or sets the template used to render the drag preview.
set_preview_template
fn set_preview_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
horizontal_drag_threshold
fn horizontal_drag_threshold(self: &Self) -> f64
Gets or sets the minimal horizontal distance required to start dragging.
set_horizontal_drag_threshold
fn set_horizontal_drag_threshold(self: &Self, value: f64)
vertical_drag_threshold
fn vertical_drag_threshold(self: &Self) -> f64
Gets or sets the minimal vertical distance required to start dragging.
set_vertical_drag_threshold
fn set_vertical_drag_threshold(self: &Self, value: f64)
preview_offset
fn preview_offset(self: &Self) -> Point
Gets or sets a fixed logical offset added to the preview position.
set_preview_offset
fn set_preview_offset(self: &Self, value: Point)
data_format
fn data_format(self: &Self) -> String
Gets or sets the data format name used to identify the managed payload.
set_data_format
fn set_data_format(self: &Self, value: String)
use_pointer_relative_preview_offset
fn use_pointer_relative_preview_offset(self: &Self) -> bool
Gets or sets whether to compute a pointer-relative preview offset automatically.
set_use_pointer_relative_preview_offset
fn set_use_pointer_relative_preview_offset(self: &Self, value: bool)
preview_opacity
fn preview_opacity(self: &Self) -> f64
Gets or sets the preview window opacity.
set_preview_opacity
fn set_preview_opacity(self: &Self, value: f64)
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeBorrow<T>BorrowMut<T>Into<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyFerroObjectImplExtStyledElementImplExtClassDefaultsErasedDestructorIntoEitherStyledElementBehaviorImplExtDerefUpcast<T>Upcast<ManagedContextDragBehavior>StaticTypeObjectTypeSubclassable<T>DefaultConstructibleFerroObjectImplStyledElementImplStyledElementBehaviorImpl
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.