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.
|
DocumentDragValid
Declaration
public static Cursor DocumentDragValid
Field Value
System.
|
Properties
AllowedDockManagerEdges
Determines what of the owning Rad
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
System.
|
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.
Declaration
public SplitPanel DropAnchor { get; }
Property Value
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.
Declaration
public bool ShowDockingGuides { get; set; }
Property Value
System.
|
Methods
CanStart(Object)
Determines whether the service can start using the provided context.
Declaration
protected override bool CanStart(object context)
Parameters
System.
|
Returns
System.
|
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.
|
GetDockingGuideAllowedPosition(DockingGuidesPosition)
Gets the allowed position for the currently displayed guide for the specified guide position.
Declaration
public AllowedDockPosition GetDockingGuideAllowedPosition(DockingGuidesPosition guidePosition)
Parameters
Docking The position of the guide. |
Returns
GetDockingGuideBounds(DockingGuidesPosition)
Gets the current screen bounds for the specified DockingGuide.
Declaration
public Rectangle GetDockingGuideBounds(DockingGuidesPosition position)
Parameters
Docking
|
Returns
System.
|
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.
|
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
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.
|
Returns
System.
|
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.
|
OnStopping(StateServiceStoppingEventArgs)
Notifies for a Stop request.
Declaration
protected override void OnStopping(StateServiceStoppingEventArgs e)
Parameters
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. 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.
|
System.
|
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.
|
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
PreviewDropTarget
Allows listeners to preview and optionally change the currently hit-tested drop target.
Declaration
public event DragDropTargetEventHandler PreviewDropTarget
Event Type
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
Explicit Interface Implementations
IMessageListener.DesiredHook
Declaration
InstalledHook IMessageListener.DesiredHook { get; }
Returns
Implements
IMessageListener.PreviewMessage(ref Message)
Declaration
MessagePreviewResult IMessageListener.PreviewMessage(ref Message msg)
Parameters
System.
|
Returns
Implements
IMessageListener.PreviewSystemMessage(SystemMessage, Message)
Declaration
void IMessageListener.PreviewSystemMessage(SystemMessage message, Message msg)
Parameters
System
|
System.
|
Implements
IMessageListener.PreviewWndProc(Message)
Declaration
void IMessageListener.PreviewWndProc(Message msg)
Parameters
System.
|