Manages tab dragging for reordering, transferring tabs between forms, and detaching tabs into a new form.
Definition
Namespace:Telerik.WinControls.UI
Assembly:Telerik.WinControls.UI.dll
Syntax:
public class RadTabbedFormDragDropService : RadDragDropService, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, IMessageListener
Inheritance: objectDisposableObjectRadObjectRadServiceRadDragDropServiceRadTabbedFormDragDropService...
Implements:
Inherited Members
Constructors
Initializes the drag service for the specified tabbed-form element.
public RadTabbedFormDragDropService(RadTabbedFormControlElement owner)
The element whose tab items are managed by the drag service.
Fields
Gets or sets the tab item currently being dragged.
protected RadTabbedFormControlItem dragItem
Gets or sets the interval, in milliseconds, used to continue a drag after a tab is transferred to another form.
protected int dragTimerInterval
Gets or sets the screen position used as the reference point for immediate tab reordering.
protected Point startPoint
Methods
Closes the original form after a tab has been moved out of it.
protected virtual void CloseOldTabbedForm()
Unhooks the drag continuation timer before releasing managed resources.
protected override void DisposeManagedResources()
Overrides:
Calculates the tab insertion position corresponding to a drop location.
protected virtual int GetTargetIndex(Point client, RadTabbedFormControlItem hitItem, RadTabbedFormControlElement dropTarget)
The drop location in target-element coordinates.
hitItemRadTabbedFormControlItemThe tab under the drop location, if any.
dropTargetRadTabbedFormControlElementThe element receiving the drop.
Returns:The zero-based insertion position, or -1 when the location is not a valid drop target.
Completes cancellation handling and closes the original form when appropriate after Escape is pressed.
protected override void HandleEscKeyDown()
Overrides:
Handles release of the left mouse button and processes a drop outside the source tab strip.
protected override void HandleLeftButtonUp()
Overrides:
Updates immediate-reorder feedback or handles dragging a tab toward another form.
protected override void HandleMouseMove(Point mousePosition)
The current cursor position in screen coordinates.
Overrides:
Finishes attaching a transferred tab, selects it in the target form, and schedules continuation of the drag.
protected virtual void OnNewTabAdded(object sender, RadTabbedFormControlEventArgs e)
The control that raised the tab-added notification.
eRadTabbedFormControlEventArgsThe event data for the newly added tab.
Prevents a preview drop onto a pinned tab.
protected override void OnPreviewDragOver(RadDragOverEventArgs e)
The drag-over data whose drop eligibility is updated.
Overrides:
Raises TabbedFormCreating while preparing a form for a detached tab.
protected virtual void OnTabbedFormCreating(object sender, TabbedFormCreatingEventArgs args)
The source of the request.
argsTabbedFormCreatingEventArgsThe form to customize and cancellation flag.
Raises TabbedFormShown after the detached tab's form is shown.
protected virtual void OnTabbedFormShown(object sender, TabbedFormShownEventArgs args)
The source of the notification.
argsTabbedFormShownEventArgsThe shown form.
Transfers the dragged tab into an existing target form when the pointer resolves to a valid insertion position.
protected virtual void PerformDropInExistingForm(RadTabbedFormControlElement dropTarget, Point dropLocation, Point mousePos)
The tabbed-form element receiving the tab.
dropLocationPointThe drop location in the target form's coordinates.
mousePosPointThe current pointer location in screen coordinates.
Initializes drag state, captures the original form when dragging its only tab, and prepares the preview hint when needed.
protected override void PerformStart()
Overrides:
Restores drag visuals and resources unless a timer is handing the drag off to another form.
protected override void PerformStop()
Overrides:
Determines whether the pointer is over the caption or tab strip area where the form should be brought forward.
protected virtual bool ShouldBringFormToFront(RadTabbedFormControlElement element, Point location)
The tabbed-form element under consideration.
locationPointThe pointer location in the element's coordinates.
Returns:true when the location is within the caption or tab strip height.
Events
Occurs while preparing a new form to receive a detached tab; handlers can customize the form or cancel the operation.
public event EventHandler<TabbedFormCreatingEventArgs> TabbedFormCreating
Occurs after the new form created for a detached tab is shown.
public event EventHandler<TabbedFormShownEventArgs> TabbedFormShown