New to Telerik UI for WinFormsStart a free 30-day trial

Encapsulates the core drag-and-drop functionality for a RadDock instance. What RadDock does is to start and stop the service when drag operation is instanciated.

Definition

Constructors

Default constructor.

C#
public DragDropService()

Fields

C#
public static Cursor DocumentDragInvalid
C#
public static Cursor DocumentDragValid

Properties

Determines what of the owning RadDock instance's edges will be allowed for drop.

C#
public AllowedDockPosition AllowedDockManagerEdges { get; set; }

Gets or sets the allowed states for committing drag-and-drop operation.

C#
public AllowedDockState AllowedStates { get; set; }

Drag-and-drop service is available at design-time (in preview mode only).

C#
public override bool AvailableAtDesignTime { get; }

Overrides: StateService.AvailableAtDesignTime

Gets or sets the behavior of the service when it is running. Allows for specifying manual behavior, which enables service automation.

C#
public DragDropBehavior DragDropBehavior { get; set; }

Gets the DragDropContext value, which defines what is the current drag context.

C#
public DragDropContext DragDropContext { get; }

Gets or sets the mode used by the service to perform drag-and-drop operations.

C#
public DragDropMode DragDropMode { get; set; }

Gets the target of the drop operation. This member is valid only while the service is started and may be null.

C#
public SplitPanel DropAnchor { get; }

Gets the hit-test result of the current drag-drop operation. Valid only while the service is started.

C#
public DockingGuideHitTest HitTestResult { get; }

Gets or Sets the value which indicates whether the docking guides will be shown.

C#
public bool ShowDockingGuides { get; set; }

Methods

Determines whether the service can start using the provided context.

C#
protected override bool CanStart(object context)
Parameters:contextobjectReturns:

bool

Overrides: StateService.CanStart(object)

Commits the drag-and-drop operation.

C#
protected override void Commit()

Overrides: StateService.Commit()

C#
protected override void DisposeManagedResources()

Overrides: RadDockObject.DisposeManagedResources()

Preforms a drag pass, during which a hit-test operation is performed and docking guides and hints are updated respectively.

C#
protected virtual void Drag(Point mousePos)
Parameters:mousePosPoint

Gets the allowed position for the currently displayed guide for the specified guide position.

C#
public AllowedDockPosition GetDockingGuideAllowedPosition(DockingGuidesPosition guidePosition)
Parameters:guidePositionDockingGuidesPosition

The position of the guide.

Returns:

AllowedDockPosition

Gets the current screen bounds for the specified DockingGuide.

C#
public Rectangle GetDockingGuideBounds(DockingGuidesPosition position)
Parameters:positionDockingGuidesPositionReturns:

Rectangle

Gets the current location for a dragged object. The associated object depends on the current drag mode - it may be a FloatingWindow or a DockingHintPopup instance.

C#
protected virtual Point GetDragLocation()
Returns:

Point

Searches for a drop target under the cursor position. May return null if no appropriate control is found.

C#
protected virtual SplitPanel GetDropTarget()
Returns:

SplitPanel

Determines whether the provides context is valid and a drag-drop operation may be instanciated.

C#
protected override bool IsContextValid(object context)
Parameters:contextobjectReturns:

bool

Overrides: StateService.IsContextValid(object)

Receives notification for a change in the current docking guides template.

C#
protected virtual void OnDockingGuidesTemplateChanged()
C#
protected override void OnDockManagerChanged()

Overrides: StateService.OnDockManagerChanged()

Raises the Dragging notification.

C#
protected virtual void OnDragging(CancelEventArgs args)
Parameters:argsCancelEventArgs

Notifies for a Stop request.

C#
protected override void OnStopping(StateServiceStoppingEventArgs e)
Parameters:eStateServiceStoppingEventArgs

Overrides: StateService.OnStopping(StateServiceStoppingEventArgs)

Performs a drag pass. Allows for service automation. The service must be started for this method to execute properly.

C#
public void PerformDrag(Point screenMousePos)
Parameters:screenMousePosPoint

The position of the mouse in screen coordinates.

Preforms the core start process.

C#
protected override void PerformStart()

Overrides: StateService.PerformStart()

Performs the core stop process.

C#
protected override void PerformStop()

Overrides: StateService.PerformStop()

Updates all docking guides' bounds on the screen.

C#
protected virtual void PositonDockingGuides()

Starts the service with the specified context, using the provided Point as initial.

C#
public void Start(object context, Point start)
Parameters:contextobjectstartPoint

Events

Notifies for a Drag event of the service. While working, this notification will be raised upon each mouse move event.

C#
public event CancelEventHandler Dragging

Allows listeners to preview and optionally modify the allowed dock position for the hit-tested drop target.

C#
public event DragDropDockPositionEventHandler PreviewDockPosition

Allows listeners to preview and optionally change the currently hit-tested drop target.

C#
public event DragDropTargetEventHandler PreviewDropTarget

Allows listeners to preview and optionally change the current hit-test result generated by the service upon a drag operation.

C#
public event DragDropHitTestEventHandler PreviewHitTest