Drag and Drop

Drag Drop Service

RadTabbedFormControl is working with a drag-drop service which manages the entire drag-drop operation. The service is exposed by the main element of the control. The RadTabbedFormDragDropService inherits the base RadDragDropService and also exposes two important events providing information when dragging a tab outside of their form results in creating a new form.

  • TabbedFormCreating: Gets or Sets the new form which is about to be shown and it also exposes the dragged tab. The event can be canceled.
  • TabbedFormShown: Gets the tabbed form which also exposes the added RadTabbedFormControl.

The tabbed control is added to the form in its Shown event. If the TabbedFormControl property of the form is accessed before showing it, it will return null.

RadTabbedFormDragDropService

RadTabbedFormDragDropService dragDropService = this.TabbedFormControl.TabbedFormControlElement.ItemDragService;
dragDropService.TabbedFormCreating += DragDropService_TabbedFormCreating;
dragDropService.TabbedFormShown += DragDropService_TabbedFormShown;

Dim dragDropService As RadTabbedFormDragDropService = Me.TabbedFormControl.TabbedFormControlElement.ItemDragService
AddHandler dragDropService.TabbedFormCreating, AddressOf DragDropService_TabbedFormCreating
AddHandler dragDropService.TabbedFormShown, AddressOf DragDropService_TabbedFormShown

Reordering via Drag and Drop

By default you can reorder the tabs via drag an drop.

Figure 1: Reorder Tabs.

radtabbedform-drag-drop001

Detach a tab in a single window.

By default you can popup any tab in a standalone window.

Figure 2: Detach Tabs.

radtabbedform-drag-drop002

Attach a tab to the main form

You can attach any stand alone tabbed form to the main form as well.

Figure 3: Attach Tabs.

radtabbedform-drag-drop003

Drag Mode

There are three drag modes that are currently supported:

  • Immediate: the tabs are moved while dragging.
  • Preview: the tab is moved after the mouse is released.
  • None: the drag and drop functionality is disabled.

Setting the Drag Drop Mode

this.TabbedFormControl.ItemDragMode = TabItemDragMode.Preview;

Me.TabbedFormControl.ItemDragMode = TabItemDragMode.Preview

radtabbedform-drag-drop004

In this article
Not finding the help you need? Improve this article