Class 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.
Inherited Members
Namespace: Telerik.WinControls.UI.Docking
Assembly: Telerik.WinControls.RadDock.dll
Syntax
public class DragDropService : StateService, IDisposable, INotifyPropertyChanged, INotifyPropertyChangingEx, IMessageListener
Constructors
DragDropService()
Default constructor.
Declaration
public DragDropService()
Fields
DocumentDragInvalid
Declaration
public static Cursor DocumentDragInvalid
Field Value
System.Windows.Forms.Cursor
|
DocumentDragValid
Declaration
public static Cursor DocumentDragValid
Field Value
System.Windows.Forms.Cursor
|
Properties
AllowedDockManagerEdges
Determines what of the owning RadDock instance's edges will be allowed for drop.
Declaration
public AllowedDockPosition AllowedDockManagerEdges { get; set; }
Property Value
AllowedDockPosition
|
AllowedStates
Gets or sets the allowed states for committing drag-and-drop operation.
Declaration
public AllowedDockState AllowedStates { get; set; }
Property Value
AllowedDockState
|
AvailableAtDesignTime
Drag-and-drop service is available at design-time (in preview mode only).
Declaration
public override bool AvailableAtDesignTime { get; }
Property Value
System.Boolean
|
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
DragDropBehavior
|
DragDropContext
Gets the DragDropContext value, which defines what is the current drag context.
Declaration
public DragDropContext DragDropContext { get; }
Property Value
DragDropContext
|
DragDropMode
Gets or sets the mode used by the service to perform drag-and-drop operations.
Declaration
public DragDropMode DragDropMode { get; set; }
Property Value
DragDropMode
|
DropAnchor
Gets the target of the drop operation. This member is valid only while the service is started and may be null.
Declaration
public SplitPanel DropAnchor { get; }
Property Value
SplitPanel
|
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
DockingGuideHitTest
|
ShowDockingGuides
Gets or Sets the value which indicates whether the docking guides will be shown.
Declaration
public bool ShowDockingGuides { get; set; }
Property Value
System.Boolean
|
Methods
CanStart(Object)
Determines whether the service can start using the provided context.
Declaration
protected override bool CanStart(object context)
Parameters
System.Object
context
|
Returns
System.Boolean
|
Overrides
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.
Declaration
protected virtual void Drag(Point mousePos)
Parameters
System.Drawing.Point
mousePos
|
GetDockingGuideAllowedPosition(DockingGuidesPosition)
Gets the allowed position for the currently displayed guide for the specified guide position.
Declaration
public AllowedDockPosition GetDockingGuideAllowedPosition(DockingGuidesPosition guidePosition)
Parameters
DockingGuidesPosition
guidePosition
The position of the guide. |
Returns
AllowedDockPosition
|
GetDockingGuideBounds(DockingGuidesPosition)
Gets the current screen bounds for the specified DockingGuide.
Declaration
public Rectangle GetDockingGuideBounds(DockingGuidesPosition position)
Parameters
DockingGuidesPosition
position
|
Returns
System.Drawing.Rectangle
|
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.
Declaration
protected virtual Point GetDragLocation()
Returns
System.Drawing.Point
|
GetDropTarget()
Searches for a drop target under the cursor position. May return null if no appropriate control is found.
Declaration
protected virtual SplitPanel GetDropTarget()
Returns
SplitPanel
|
IsContextValid(Object)
Determines whether the provides context is valid and a drag-drop operation may be instanciated.
Declaration
protected override bool IsContextValid(object context)
Parameters
System.Object
context
|
Returns
System.Boolean
|
Overrides
OnDockingGuidesTemplateChanged()
Receives notification for a change in the current docking guides template.
Declaration
protected virtual void OnDockingGuidesTemplateChanged()
OnDockManagerChanged()
Declaration
protected override void OnDockManagerChanged()
Overrides
OnDragging(CancelEventArgs)
Raises the Dragging notification.
Declaration
protected virtual void OnDragging(CancelEventArgs args)
Parameters
System.ComponentModel.CancelEventArgs
args
|
OnStopping(StateServiceStoppingEventArgs)
Notifies for a Stop request.
Declaration
protected override void OnStopping(StateServiceStoppingEventArgs e)
Parameters
StateServiceStoppingEventArgs
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
System.Drawing.Point
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.
Declaration
public void Start(object context, Point start)
Parameters
System.Object
context
|
System.Drawing.Point
start
|
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 Type
System.ComponentModel.CancelEventHandler
|
PreviewDockPosition
Allows listeners to preview and optionally modify the allowed dock position for the hit-tested drop target.
Declaration
public event DragDropDockPositionEventHandler PreviewDockPosition
Event Type
DragDropDockPositionEventHandler
|
PreviewDropTarget
Allows listeners to preview and optionally change the currently hit-tested drop target.
Declaration
public event DragDropTargetEventHandler PreviewDropTarget
Event Type
DragDropTargetEventHandler
|
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 Type
DragDropHitTestEventHandler
|
Explicit Interface Implementations
IMessageListener.DesiredHook
IMessageListener.PreviewMessage(ref Message)
Declaration
MessagePreviewResult IMessageListener.PreviewMessage(ref Message msg)
Parameters
System.Windows.Forms.Message
msg
|
Returns
MessagePreviewResult
|
Implements
IMessageListener.PreviewSystemMessage(SystemMessage, Message)
Declaration
void IMessageListener.PreviewSystemMessage(SystemMessage message, Message msg)
Parameters
SystemMessage
message
|
System.Windows.Forms.Message
msg
|
Implements
IMessageListener.PreviewWndProc(Message)
Declaration
void IMessageListener.PreviewWndProc(Message msg)
Parameters
System.Windows.Forms.Message
msg
|