New to Telerik UI for WinForms? Start a free 30-day trial

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:

C#
public class RadTabbedFormDragDropService : RadDragDropService, IDisposable, INotifyPropertyChanged, ICustomTypeDescriptor, IMessageListener

Inheritance: objectDisposableObjectRadObjectRadServiceRadDragDropServiceRadTabbedFormDragDropService...

Implements: ICustomTypeDescriptorIDisposableIMessageListenerINotifyPropertyChanged

Inherited Members RadDragDropService.messageFilterAddedRadDragDropService.xOutlineFormOffsetRadDragDropService.yOutlineFormOffsetRadDragDropService.beginPointRadDragDropService.PrepareContext()RadDragDropService.OnPreviewDragHint(PreviewDragHintEventArgs)RadDragDropService.IsDropTargetValid(ISupportDrop)RadDragDropService.RestoreOriginalMouseCursor()RadDragDropService.SetHintWindowPosition(Point)RadDragDropService.ShouldBeginDrag(Point, Point)RadDragDropService.CanStart(object)RadDragDropService.OnPreviewDragStart(PreviewDragStartEventArgs)RadDragDropService.Commit()RadDragDropService.OnPreviewDragDrop(RadDropEventArgs)RadDragDropService.GetDropTarget(Point, out Point)RadDragDropService.OnPreviewDropTarget(PreviewDropTargetEventArgs)RadDragDropService.BeginDrag(Point, ISupportDrag)RadDragDropService.EndDrag(Point, RadControl)RadDragDropService.EndDrag()RadDragDropService.DoMouseMove(Point)RadDragDropService.CanCommitRadDragDropService.ValidCursorRadDragDropService.InitializedRadDragDropService.InvalidCursorRadDragDropService.UseDefaultPreviewRadDragDropService.DropTargetRadDragDropService.DropLocationRadDragDropService.HintWindowRadDragDropService.PreviewDragDropRadDragDropService.PreviewDragOverRadDragDropService.PreviewDropTargetRadDragDropService.PreviewDragStartRadDragDropService.PreviewDragHintRadService.CanOperate()RadService.Start(object)RadService.Stop(bool)RadService.Pause()RadService.Resume()RadService.OnStarted()RadService.OnStarting(RadServiceStartingEventArgs)RadService.OnStopped()RadService.OnStopping(RadServiceStoppingEventArgs)RadService.IsContextValid(object)RadService.Abort()RadService.PerformResume()RadService.PerformPause()RadService.SetContext(object)RadService.OnEnabledChanged()RadService.ContextRadService.AvailableAtDesignTimeRadService.StateRadService.NameRadService.EnabledRadService.StartingRadService.StartedRadService.StoppingRadService.StoppedRadObject.BindingContextPropertyRadObject.RadTypeRadObject.ReplaceDefaultDescriptors(PropertyDescriptorCollection)RadObject.ClearPropertyStore()RadObject.SuspendPropertyNotifications()RadObject.ResumePropertyNotifications()RadObject.GetPropertyValue(RadProperty)RadObject.SetDefaultValueOverride(RadProperty, object)RadObject.GetValue(RadProperty)RadObject.SetValue(RadProperty, object)RadObject.ResetValue(RadProperty)RadObject.ResetLocalValue(RadProperty)RadObject.ResetValue(RadProperty, ValueResetFlags)RadObject.UpdateValue(RadProperty)RadObject.GetValueSource(RadProperty)RadObject.GetRegisteredRadProperty(string)RadObject.UpdateValueCore(RadPropertyValue)RadObject.SetValueCore(RadPropertyValue, object, object, ValueSource)RadObject.ResetValueCore(RadPropertyValue, ValueResetFlags)RadObject.GetDefaultValue(RadPropertyValue, object)RadObject.CoerceValue(RadPropertyValue, object)RadObject.ShouldSerializeProperty(RadProperty)RadObject.CanRaisePropertyChangeNotifications(RadPropertyValue)RadObject.BindProperty(RadProperty, RadObject, RadProperty, PropertyBindingOptions)RadObject.UnbindProperty(RadProperty)RadObject.AddStylePropertySetting(IPropertySetting)RadObject.GetInheritedValue(RadProperty)RadObject.OnPropertyChanging(RadPropertyChangingEventArgs)RadObject.OnPropertyChanged(RadPropertyChangedEventArgs)RadObject.OnNotifyPropertyChanged(string)RadObject.OnNotifyPropertyChanged(PropertyChangedEventArgs)RadObject.OnShouldSerializeProperty(ShouldSerializePropertyEventArgs)RadObject.IsPropertyCancelable(RadPropertyMetadata)RadObject.PropertyValuesRadObject.PropertyFilterRadObject.RadObjectTypeRadObject.BindingContextRadObject.PropertyChangedRadObject.RadPropertyChangedRadObject.RadPropertyChangingDisposableObject.GetBitState(long)DisposableObject.SetBitState(long, bool)DisposableObject.OnBitStateChanged(long, bool, bool)DisposableObject.Dispose()DisposableObject.Dispose(bool)DisposableObject.PerformDispose(bool)DisposableObject.DisposeUnmanagedResources()DisposableObject.BitStateDisposableObject.EventsDisposableObject.IsDisposingDisposableObject.IsDisposedDisposableObject.DisposedDisposableObject.Disposing...

Constructors

Initializes the drag service for the specified tabbed-form element.

C#
public RadTabbedFormDragDropService(RadTabbedFormControlElement owner)
Parameters:ownerRadTabbedFormControlElement

The element whose tab items are managed by the drag service.

Fields

Gets or sets the tab item currently being dragged.

C#
protected RadTabbedFormControlItem dragItem

Gets or sets the interval, in milliseconds, used to continue a drag after a tab is transferred to another form.

C#
protected int dragTimerInterval

Gets or sets the screen position used as the reference point for immediate tab reordering.

C#
protected Point startPoint

Methods

Closes the original form after a tab has been moved out of it.

C#
protected virtual void CloseOldTabbedForm()

Unhooks the drag continuation timer before releasing managed resources.

C#
protected override void DisposeManagedResources()

Overrides: RadDragDropService.DisposeManagedResources()

Calculates the tab insertion position corresponding to a drop location.

C#
protected virtual int GetTargetIndex(Point client, RadTabbedFormControlItem hitItem, RadTabbedFormControlElement dropTarget)
Parameters:clientPoint

The drop location in target-element coordinates.

hitItemRadTabbedFormControlItem

The tab under the drop location, if any.

dropTargetRadTabbedFormControlElement

The element receiving the drop.

Returns:

int

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.

C#
protected override void HandleEscKeyDown()

Overrides: RadDragDropService.HandleEscKeyDown()

Handles release of the left mouse button and processes a drop outside the source tab strip.

C#
protected override void HandleLeftButtonUp()

Overrides: RadDragDropService.HandleLeftButtonUp()

Updates immediate-reorder feedback or handles dragging a tab toward another form.

C#
protected override void HandleMouseMove(Point mousePosition)
Parameters:mousePositionPoint

The current cursor position in screen coordinates.

Overrides: RadDragDropService.HandleMouseMove(Point)

Resumes dragging the transferred tab when the left mouse button is still held.

C#
protected virtual void OnDragTimerTick(object sender, EventArgs e)
Parameters:senderobject

The timer that raised the event.

eEventArgs

The event data.

Finishes attaching a transferred tab, selects it in the target form, and schedules continuation of the drag.

C#
protected virtual void OnNewTabAdded(object sender, RadTabbedFormControlEventArgs e)
Parameters:senderobject

The control that raised the tab-added notification.

eRadTabbedFormControlEventArgs

The event data for the newly added tab.

Prevents a preview drop onto a pinned tab.

C#
protected override void OnPreviewDragOver(RadDragOverEventArgs e)
Parameters:eRadDragOverEventArgs

The drag-over data whose drop eligibility is updated.

Overrides: RadDragDropService.OnPreviewDragOver(RadDragOverEventArgs)

Raises TabbedFormCreating while preparing a form for a detached tab.

C#
protected virtual void OnTabbedFormCreating(object sender, TabbedFormCreatingEventArgs args)
Parameters:senderobject

The source of the request.

argsTabbedFormCreatingEventArgs

The form to customize and cancellation flag.

Raises TabbedFormShown after the detached tab's form is shown.

C#
protected virtual void OnTabbedFormShown(object sender, TabbedFormShownEventArgs args)
Parameters:senderobject

The source of the notification.

argsTabbedFormShownEventArgs

The shown form.

Transfers the dragged tab into an existing target form when the pointer resolves to a valid insertion position.

C#
protected virtual void PerformDropInExistingForm(RadTabbedFormControlElement dropTarget, Point dropLocation, Point mousePos)
Parameters:dropTargetRadTabbedFormControlElement

The tabbed-form element receiving the tab.

dropLocationPoint

The drop location in the target form's coordinates.

mousePosPoint

The 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.

C#
protected override void PerformStart()

Overrides: RadDragDropService.PerformStart()

Restores drag visuals and resources unless a timer is handing the drag off to another form.

C#
protected override void PerformStop()

Overrides: RadDragDropService.PerformStop()

Determines whether the pointer is over the caption or tab strip area where the form should be brought forward.

C#
protected virtual bool ShouldBringFormToFront(RadTabbedFormControlElement element, Point location)
Parameters:elementRadTabbedFormControlElement

The tabbed-form element under consideration.

locationPoint

The pointer location in the element's coordinates.

Returns:

bool

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.

C#
public event EventHandler<TabbedFormCreatingEventArgs> TabbedFormCreating

Occurs after the new form created for a detached tab is shown.

C#
public event EventHandler<TabbedFormShownEventArgs> TabbedFormShown