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.

Definition

Namespace:Telerik.WinControls.UI.Docking

Assembly:Telerik.WinControls.RadDock.dll

Syntax:

cs-api-definition
public class DragDropService : StateService, IDisposable, INotifyPropertyChanged, INotifyPropertyChangingEx, IMessageListener

Inheritance: objectRadDockObjectRadDockServiceStateServiceDragDropService

Implements: IDisposableIMessageListenerINotifyPropertyChangedINotifyPropertyChangingEx

Inherited Members StateService.Start(object)StateService.Stop(bool)StateService.Pause()StateService.Resume()StateService.OnEnabledChanged()StateService.OnStarted()StateService.OnStarting(StateServiceStartingEventArgs)StateService.OnStopped()StateService.Abort()StateService.PerformResume()StateService.PerformPause()StateService.SetContext(object)StateService.ContextStateService.StateStateService.StartingStateService.StartedStateService.StoppingStateService.StoppedRadDockService.CanOperate()RadDockService.DockManagerDesignModeRadDockService.DockManagerRadDockService.EnabledRadDockObject.Dispose()RadDockObject.Dispose(bool)RadDockObject.DisposeUnmanagedResources()RadDockObject.OnPropertyChanging(string)RadDockObject.OnPropertyChanged(string)RadDockObject.ShouldSerializeProperty(string)RadDockObject.EventsRadDockObject.DisposingRadDockObject.IsDisposedRadDockObject.DisposedRadDockObject.PropertyChangingRadDockObject.PropertyChanged

Constructors

DragDropService()

Default constructor.

Declaration

cs-api-definition
public DragDropService()

Fields

DocumentDragInvalid

Declaration

cs-api-definition
public static Cursor DocumentDragInvalid

Field Value

Cursor

DocumentDragValid

Declaration

cs-api-definition
public static Cursor DocumentDragValid

Field Value

Cursor

Properties

AllowedDockManagerEdges

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

Declaration

cs-api-definition
public AllowedDockPosition AllowedDockManagerEdges { get; set; }

Property Value

AllowedDockPosition

AllowedStates

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

Declaration

cs-api-definition
public AllowedDockState AllowedStates { get; set; }

Property Value

AllowedDockState

AvailableAtDesignTime

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

Declaration

cs-api-definition
public override bool AvailableAtDesignTime { get; }

Property Value

bool

Overrides StateService.AvailableAtDesignTime

DragDropBehavior

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

Declaration

cs-api-definition
public DragDropBehavior DragDropBehavior { get; set; }

Property Value

DragDropBehavior

DragDropContext

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

Declaration

cs-api-definition
public DragDropContext DragDropContext { get; }

Property Value

DragDropContext

DragDropMode

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

Declaration

cs-api-definition
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

cs-api-definition
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

cs-api-definition
public DockingGuideHitTest HitTestResult { get; }

Property Value

DockingGuideHitTest

ShowDockingGuides

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

Declaration

cs-api-definition
public bool ShowDockingGuides { get; set; }

Property Value

bool

Methods

CanStart(object)

Determines whether the service can start using the provided context.

Declaration

cs-api-definition
protected override bool CanStart(object context)

Parameters

context

object

Returns

bool

Overrides StateService.CanStart(object)

Commit()

Commits the drag-and-drop operation.

Declaration

cs-api-definition
protected override void Commit()

Overrides StateService.Commit()

DisposeManagedResources()

Declaration

cs-api-definition
protected override void DisposeManagedResources()

Overrides RadDockObject.DisposeManagedResources()

Drag(Point)

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

Declaration

cs-api-definition
protected virtual void Drag(Point mousePos)

Parameters

mousePos

Point

GetDockingGuideAllowedPosition(DockingGuidesPosition)

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

Declaration

cs-api-definition
public AllowedDockPosition GetDockingGuideAllowedPosition(DockingGuidesPosition guidePosition)

Parameters

guidePosition

DockingGuidesPosition

The position of the guide.

Returns

AllowedDockPosition

GetDockingGuideBounds(DockingGuidesPosition)

Gets the current screen bounds for the specified DockingGuide.

Declaration

cs-api-definition
public Rectangle GetDockingGuideBounds(DockingGuidesPosition position)

Parameters

position

DockingGuidesPosition

Returns

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

cs-api-definition
protected virtual Point GetDragLocation()

Returns

Point

GetDropTarget()

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

Declaration

cs-api-definition
protected virtual SplitPanel GetDropTarget()

Returns

SplitPanel

IsContextValid(object)

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

Declaration

cs-api-definition
protected override bool IsContextValid(object context)

Parameters

context

object

Returns

bool

Overrides StateService.IsContextValid(object)

OnDockManagerChanged()

Declaration

cs-api-definition
protected override void OnDockManagerChanged()

Overrides StateService.OnDockManagerChanged()

OnDockingGuidesTemplateChanged()

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

Declaration

cs-api-definition
protected virtual void OnDockingGuidesTemplateChanged()

OnDragging(CancelEventArgs)

Raises the Dragging notification.

Declaration

cs-api-definition
protected virtual void OnDragging(CancelEventArgs args)

Parameters

args

CancelEventArgs

OnStopping(StateServiceStoppingEventArgs)

Notifies for a Stop request.

Declaration

cs-api-definition
protected override void OnStopping(StateServiceStoppingEventArgs e)

Parameters

e

StateServiceStoppingEventArgs

Overrides StateService.OnStopping(StateServiceStoppingEventArgs)

PerformDrag(Point)

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

Declaration

cs-api-definition
public void PerformDrag(Point screenMousePos)

Parameters

screenMousePos

Point

The position of the mouse in screen coordinates.

PerformStart()

Preforms the core start process.

Declaration

cs-api-definition
protected override void PerformStart()

Overrides StateService.PerformStart()

PerformStop()

Performs the core stop process.

Declaration

cs-api-definition
protected override void PerformStop()

Overrides StateService.PerformStop()

PositonDockingGuides()

Updates all docking guides' bounds on the screen.

Declaration

cs-api-definition
protected virtual void PositonDockingGuides()

Start(object, Point)

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

Declaration

cs-api-definition
public void Start(object context, Point start)

Parameters

context

object

start

Point

Events

Dragging

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

Declaration

cs-api-definition
public event CancelEventHandler Dragging

Event Value

CancelEventHandler

PreviewDockPosition

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

Declaration

cs-api-definition
public event DragDropDockPositionEventHandler PreviewDockPosition

Event Value

DragDropDockPositionEventHandler

PreviewDropTarget

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

Declaration

cs-api-definition
public event DragDropTargetEventHandler PreviewDropTarget

Event Value

DragDropTargetEventHandler

PreviewHitTest

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

Declaration

cs-api-definition
public event DragDropHitTestEventHandler PreviewHitTest

Event Value

DragDropHitTestEventHandler