ClassDragDropService
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
Fields
Properties
AllowedDockManagerEdges
Determines what of the owning RadDock instance's edges will be allowed for drop.
Declaration
public AllowedDockPosition AllowedDockManagerEdges { get; set; }
Property Value
AllowedStates
Gets or sets the allowed states for committing drag-and-drop operation.
Declaration
public AllowedDockState AllowedStates { get; set; }
Property Value
AvailableAtDesignTime
Drag-and-drop service is available at design-time (in preview mode only).
Declaration
public override bool AvailableAtDesignTime { get; }
Property Value
Overrides
DragDropBehavior
Gets or sets the behavior of the service when it is running. Allows for specifying manual behavior, which enables service automation.
Declaration
public DragDropBehavior DragDropBehavior { get; set; }
Property Value
DragDropContext
Gets the DragDropContext value, which defines what is the current drag context.
Declaration
public DragDropContext DragDropContext { get; }
Property Value
DragDropMode
Gets or sets the mode used by the service to perform drag-and-drop operations.
Declaration
public DragDropMode DragDropMode { get; set; }
Property Value
DropAnchor
Gets the target of the drop operation. This member is valid only while the service is started and may be null.
HitTestResult
Gets the hit-test result of the current drag-drop operation. Valid only while the service is started.
Declaration
public DockingGuideHitTest HitTestResult { get; }
Property Value
ShowDockingGuides
Gets or Sets the value which indicates whether the docking guides will be shown.
Methods
CanStart(object)
Determines whether the service can start using the provided context.
Commit()
Commits the drag-and-drop operation.
Declaration
protected override void Commit()
Overrides
DisposeManagedResources()
Declaration
protected override void DisposeManagedResources()
Overrides
Drag(Point)
Preforms a drag pass, during which a hit-test operation is performed and docking guides and hints are updated respectively.
GetDockingGuideAllowedPosition(DockingGuidesPosition)
Gets the allowed position for the currently displayed guide for the specified guide position.
Declaration
public AllowedDockPosition GetDockingGuideAllowedPosition(DockingGuidesPosition guidePosition)
Parameters
guidePosition
The position of the guide.
Returns
GetDockingGuideBounds(DockingGuidesPosition)
Gets the current screen bounds for the specified DockingGuide.
Declaration
public Rectangle GetDockingGuideBounds(DockingGuidesPosition position)
Parameters
position
Returns
GetDragLocation()
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.
GetDropTarget()
Searches for a drop target under the cursor position. May return null if no appropriate control is found.
IsContextValid(object)
Determines whether the provides context is valid and a drag-drop operation may be instanciated.
OnDockManagerChanged()
Declaration
protected override void OnDockManagerChanged()
Overrides
OnDockingGuidesTemplateChanged()
Receives notification for a change in the current docking guides template.
Declaration
protected virtual void OnDockingGuidesTemplateChanged()
OnDragging(CancelEventArgs)
Raises the Dragging notification.
Declaration
protected virtual void OnDragging(CancelEventArgs args)
Parameters
args
OnStopping(StateServiceStoppingEventArgs)
Notifies for a Stop request.
Declaration
protected override void OnStopping(StateServiceStoppingEventArgs e)
Parameters
e
Overrides
PerformDrag(Point)
Performs a drag pass. Allows for service automation. The service must be started for this method to execute properly.
Declaration
public void PerformDrag(Point screenMousePos)
Parameters
screenMousePos
The position of the mouse in screen coordinates.
PerformStart()
Preforms the core start process.
Declaration
protected override void PerformStart()
Overrides
PerformStop()
Performs the core stop process.
Declaration
protected override void PerformStop()
Overrides
PositonDockingGuides()
Updates all docking guides' bounds on the screen.
Declaration
protected virtual void PositonDockingGuides()
Start(object, Point)
Starts the service with the specified context, using the provided Point as initial.
Events
Dragging
Notifies for a Drag event of the service. While working, this notification will be raised upon each mouse move event.
Declaration
public event CancelEventHandler Dragging
Event Value
PreviewDockPosition
Allows listeners to preview and optionally modify the allowed dock position for the hit-tested drop target.
Declaration
public event DragDropDockPositionEventHandler PreviewDockPosition
Event Value
PreviewDropTarget
Allows listeners to preview and optionally change the currently hit-tested drop target.
Declaration
public event DragDropTargetEventHandler PreviewDropTarget
Event Value
PreviewHitTest
Allows listeners to preview and optionally change the current hit-test result generated by the service upon a drag operation.
Declaration
public event DragDropHitTestEventHandler PreviewHitTest
Event Value