FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    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.

    View source

    Members

    TYPE

    const TYPE: &'static $crate::TypeInfo
    

    The runtime type of this class.

    Source

    to_ref

    fn to_ref(self: &Self) -> $crate::Ref<ManagedContextDragBehavior>
    

    Returns a strong reference to this object.

    Source

    context_property

    fn context_property() -> &'static StyledProperty<Option<BoxedValue>>
    

    Gets or sets the context value used as a drag payload when the drag starts.

    Source

    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.

    Source

    horizontal_drag_threshold_property

    fn horizontal_drag_threshold_property() -> &'static StyledProperty<f64>
    

    Gets or sets the minimal horizontal distance required to start dragging.

    Source

    vertical_drag_threshold_property

    fn vertical_drag_threshold_property() -> &'static StyledProperty<f64>
    

    Gets or sets the minimal vertical distance required to start dragging.

    Source

    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.

    Source

    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.

    Source

    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.

    Source

    preview_opacity_property

    fn preview_opacity_property() -> &'static StyledProperty<f64>
    

    Gets or sets the preview window opacity.

    Source

    construct

    fn construct() -> Self
    

    Creates the class data; see ferroui_base::FerroObject::construct.

    Source

    new

    fn new() -> Ref<Self>
    

    Creates the behavior.

    Source

    context

    fn context(self: &Self) -> Option<BoxedValue>
    

    Gets or sets the context value used as a drag payload when the drag starts.

    Source

    set_context

    fn set_context(self: &Self, value: Option<BoxedValue>)
    

    Source

    preview_template

    fn preview_template(self: &Self) -> Option<Rc<dyn IDataTemplate>>
    

    Gets or sets the template used to render the drag preview.

    Source

    set_preview_template

    fn set_preview_template(self: &Self, value: Option<Rc<dyn IDataTemplate>>)
    

    Source

    horizontal_drag_threshold

    fn horizontal_drag_threshold(self: &Self) -> f64
    

    Gets or sets the minimal horizontal distance required to start dragging.

    Source

    set_horizontal_drag_threshold

    fn set_horizontal_drag_threshold(self: &Self, value: f64)
    

    Source

    vertical_drag_threshold

    fn vertical_drag_threshold(self: &Self) -> f64
    

    Gets or sets the minimal vertical distance required to start dragging.

    Source

    set_vertical_drag_threshold

    fn set_vertical_drag_threshold(self: &Self, value: f64)
    

    Source

    preview_offset

    fn preview_offset(self: &Self) -> Point
    

    Gets or sets a fixed logical offset added to the preview position.

    Source

    set_preview_offset

    fn set_preview_offset(self: &Self, value: Point)
    

    Source

    data_format

    fn data_format(self: &Self) -> String
    

    Gets or sets the data format name used to identify the managed payload.

    Source

    set_data_format

    fn set_data_format(self: &Self, value: String)
    

    Source

    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.

    Source

    set_use_pointer_relative_preview_offset

    fn set_use_pointer_relative_preview_offset(self: &Self, value: bool)
    

    Source

    preview_opacity

    fn preview_opacity(self: &Self) -> f64
    

    Gets or sets the preview window opacity.

    Source

    set_preview_opacity

    fn set_preview_opacity(self: &Self, value: f64)
    

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.