skip navigation
  • Product Bundles

    DevCraft

    All Telerik .NET tools and Kendo UI JavaScript components in one package. Now enhanced with:

    • NEW: Design Kits for Figma
    • Online Training
    • Document Processing Library
    • Embedded Reporting for web and desktop

    Web

    Kendo UI UI for jQuery UI for Angular UI for React UI for Vue UI for Blazor UI for ASP.NET Core UI for ASP.NET MVC UI for ASP.NET AJAX

    Mobile

    UI for .NET MAUI UI for Xamarin

    Document Management

    Telerik Document Processing

    Desktop

    UI for .NET MAUI UI for WinUI UI for WinForms UI for WPF

    Reporting

    Telerik Reporting Telerik Report Server

    Testing & Mocking

    Test Studio Test Studio Dev Edition Telerik JustMock

    CMS

    Sitefinity

    UI/UX Tools

    ThemeBuilder Design System Kit Templates and Building Blocks

    Debugging

    Fiddler Fiddler Everywhere Fiddler Classic Fiddler Everywhere Reporter FiddlerCore

    Free Tools

    VB.NET to C# Converter Testing Framework
    View all products
  • Overview
  • Demos
    • What's New
    • Roadmap
    • Release History
  • Support and Learning

    • Support and Learning Hub
    • First Steps
    • Docs
    • Demos
    • Virtual Classroom
    • Forums
    • Videos
    • Blogs
    • Accessibility and Security
    • Submit a Ticket

    Productivity and Design Tools

    • Visual Studio Extensions
    • Visual Studio Templates
    • Embedded Reporting
  • Pricing
  • Shopping cart
    • Account Overview
    • Your Licenses
    • Downloads
    • Support Center
    • Forum Profile
    • Payment Methods
    • Edit Profile
    • Log out
  • Login
  • Contact Us
  • Try now

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.

Inheritance
System.Object
RadDockObject
RadDockService
StateService
DragDropService
Inherited Members
StateService.Start(Object)
StateService.Stop(Boolean)
StateService.Pause()
StateService.Resume()
StateService.OnEnabledChanged()
StateService.OnStarted()
StateService.OnStarting(StateServiceStartingEventArgs)
StateService.OnStopped()
StateService.Abort()
StateService.PerformResume()
StateService.PerformPause()
StateService.SetContext(Object)
StateService.Context
StateService.State
StateService.Starting
StateService.Started
StateService.Stopping
StateService.Stopped
RadDockService.CanOperate()
RadDockService.DockManagerDesignMode
RadDockService.DockManager
RadDockService.Enabled
RadDockObject.Dispose()
RadDockObject.Dispose(Boolean)
RadDockObject.DisposeUnmanagedResources()
RadDockObject.OnPropertyChanging(String)
RadDockObject.OnPropertyChanged(String)
RadDockObject.ShouldSerializeProperty(String)
RadDockObject.Events
RadDockObject.Disposing
RadDockObject.IsDisposed
RadDockObject.Disposed
RadDockObject.PropertyChanging
RadDockObject.PropertyChanged
System.Object.ToString()
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
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
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
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
StateService.CanStart(Object)

Commit()

Commits the drag-and-drop operation.

Declaration
protected override void Commit()
Overrides
StateService.Commit()

DisposeManagedResources()

Declaration
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
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
StateService.IsContextValid(Object)

OnDockingGuidesTemplateChanged()

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

Declaration
protected virtual void OnDockingGuidesTemplateChanged()

OnDockManagerChanged()

Declaration
protected override void OnDockManagerChanged()
Overrides
StateService.OnDockManagerChanged()

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
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
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
StateService.PerformStart()

PerformStop()

Performs the core stop process.

Declaration
protected override void PerformStop()
Overrides
StateService.PerformStop()

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

Declaration
InstalledHook IMessageListener.DesiredHook { get; }
Returns
InstalledHook

Implements
IMessageListener.DesiredHook

IMessageListener.PreviewMessage(ref Message)

Declaration
MessagePreviewResult IMessageListener.PreviewMessage(ref Message msg)
Parameters
System.Windows.Forms.Message msg

Returns
MessagePreviewResult

Implements
IMessageListener.PreviewMessage(ref Message)

IMessageListener.PreviewSystemMessage(SystemMessage, Message)

Declaration
void IMessageListener.PreviewSystemMessage(SystemMessage message, Message msg)
Parameters
SystemMessage message

System.Windows.Forms.Message msg

Implements
IMessageListener.PreviewSystemMessage(SystemMessage, Message)

IMessageListener.PreviewWndProc(Message)

Declaration
void IMessageListener.PreviewWndProc(Message msg)
Parameters
System.Windows.Forms.Message msg

Implements
IMessageListener.PreviewWndProc(Message)

Extension Methods

SvgExtentions.Traverse<T>(T, Func<T, IEnumerable<T>>)
SvgExtentions.TraverseDepthFirst<T>(T, Func<T, IEnumerable<T>>)
Getting Started
  • Install Now
  • Demos
  • Step-by-Step Tutorial
  • Sample Applications
  • SDK Samples
  • Visual Studio Extensions
Support Resources
  • Code Library
  • Knowledge Base
  • Videos
Community
  • Forums
  • Blogs
  • Feedback Portal
  • Document Processing Feedback Portal

Copyright © 2018 Progress Software Corporation and/or its subsidiaries or affiliates.
All Rights Reserved.

Progress, Telerik, and certain product names used herein are trademarks or registered trademarks of Progress Software Corporation and/or one of its subsidiaries or affiliates in the U.S. and/or other countries. See Trademarks for appropriate markings.