The xamTabControl allows the user to reorder the tabs by dragging them at a new position. This feature is disabled by default. The following screenshot demonstrates the process of moving the "Page Layout" tab to a new location between the "References" and "Mailing" tabs.
Tab Dragging Configuration Summary
Tab dragging configuration summary
The tab dragging feature supports two modes of tab dragging:
Deferred – while dragging a tab its new position is indicated by a floating representation and two insertion arrows.
Immediate – while dragging a tab, the whole tab area is constantly reordered to visualize the new tab position.
Note
Note
If the tab dragging mode is set to Immediate it will resolve to Deferred in case the tabs are rendered on multiple rows.
Note
Note
The tab dragging is not possible if the ItemsSource property is set to a read-only collection.
Tab dragging configuration summary chart
The following table explains briefly the configurable aspects of the xamTabControl’s tab dragging feature and maps its configurable aspects to the properties and events that configure them.
Configurable aspect
Details
Property/Events
Enable or Disable Tab Dragging
To enable tab dragging set this property to a value of type TabDragMode different than TabDragMode.None.
Obtain the DropLocation (relative to the drop target tab)
Obtain the Tab that was dragged
Obtain the associated Item from the underlying data source
Get notified when a tab dragging completes
TabDragComplete
Obtain the Tab that was dragged
Obtain the associated Item from the underlying data source
Note
Note
The Item property of the event argument object contains the item from the underlying data source bound to the control. If the tabs are defined in XAML the Item property will be null.
Related Topics
The following topics provide additional information related to this topic.