DragDropService
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
Namespace:Telerik.WinControls.UI.Docking
Assembly:Telerik.WinControls.RadDock.dll
Syntax:
public class DragDropService : StateService, IDisposable, INotifyPropertyChanged, INotifyPropertyChangingEx, IMessageListener
Inheritance: objectRadDockObjectRadDockServiceStateServiceDragDropService
Implements:
Inherited Members
Constructors
Default constructor.
public DragDropService()
Fields
public static Cursor DocumentDragInvalid
public static Cursor DocumentDragValid
Properties
Determines what of the owning RadDock instance's edges will be allowed for drop.
public AllowedDockPosition AllowedDockManagerEdges { get; set; }
Gets or sets the allowed states for committing drag-and-drop operation.
public AllowedDockState AllowedStates { get; set; }
Drag-and-drop service is available at design-time (in preview mode only).
public override bool AvailableAtDesignTime { get; }
Overrides:
Gets or sets the behavior of the service when it is running. Allows for specifying manual behavior, which enables service automation.
public DragDropBehavior DragDropBehavior { get; set; }
Gets the DragDropContext value, which defines what is the current drag context.
public DragDropContext DragDropContext { get; }
Gets or sets the mode used by the service to perform drag-and-drop operations.
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.
public SplitPanel DropAnchor { get; }
Gets the hit-test result of the current drag-drop operation. Valid only while the service is started.
public DockingGuideHitTest HitTestResult { get; }
Gets or Sets the value which indicates whether the docking guides will be shown.
public bool ShowDockingGuides { get; set; }
Methods
Commits the drag-and-drop operation.
protected override void Commit()
Overrides:
protected override void DisposeManagedResources()
Overrides:
Preforms a drag pass, during which a hit-test operation is performed and docking guides and hints are updated respectively.
Gets the allowed position for the currently displayed guide for the specified guide position.
public AllowedDockPosition GetDockingGuideAllowedPosition(DockingGuidesPosition guidePosition)
The position of the guide.
Returns:Gets the current screen bounds for the specified DockingGuide.
public Rectangle GetDockingGuideBounds(DockingGuidesPosition position)
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.
Searches for a drop target under the cursor position. May return null if no appropriate control is found.
Receives notification for a change in the current docking guides template.
protected virtual void OnDockingGuidesTemplateChanged()
protected override void OnDockManagerChanged()
Overrides:
Raises the Dragging notification.
Notifies for a Stop request.
protected override void OnStopping(StateServiceStoppingEventArgs e)
Overrides:
Performs a drag pass. Allows for service automation. The service must be started for this method to execute properly.
public void PerformDrag(Point screenMousePos)
The position of the mouse in screen coordinates.
Preforms the core start process.
protected override void PerformStart()
Overrides:
Performs the core stop process.
protected override void PerformStop()
Overrides:
Updates all docking guides' bounds on the screen.
protected virtual void PositonDockingGuides()
Events
Notifies for a Drag event of the service. While working, this notification will be raised upon each mouse move event.
public event CancelEventHandler Dragging
Allows listeners to preview and optionally modify the allowed dock position for the hit-tested drop target.
public event DragDropDockPositionEventHandler PreviewDockPosition
Allows listeners to preview and optionally change the currently hit-tested drop target.
public event DragDropTargetEventHandler PreviewDropTarget
Allows listeners to preview and optionally change the current hit-test result generated by the service upon a drag operation.
public event DragDropHitTestEventHandler PreviewHitTest