Docking & MDI includes a very full-featured tab control named AdvancedTabControl
and extends it with many helpful features.
An AdvancedTabControl with curved, slanted, overlapping tabs
The type of item for the Advanced
Selection
Just like with standard ItemsControl
and Selector
controls, the SelectedItem
property specifies the item that is currently selected in the tab control. Note that in MVVM scenarios, this will return the item that is selected and not the Advanced
Tab Layout Kinds
Tabs can be displayed in three layout kinds within the tab control: pinned, normal, and preview. Each tab's layout kind is set via the Advanced
Normal tabs appear normally and left-aligned within the tab strip. If the Advancedtrue
they will show a pin button that allows them to change to the Pinned layout kind when clicked.
Pinned tabs always appear to the left of all normal tabs. They always show an unpin button that, when clicked, will return them to Normal layout kind.
Preview tabs show up right-aligned in the tab strip. They are meant to show temporary contextual information. As long as the Advancedtrue
value, preview tabs will have a button on them that, when clicked, will change the tab to a Normal layout kind.
Tab Images
Tabs can show images on them if the Advancedtrue
and the AdvancedImageSource
.
Tab Overflow Behavior
There are numerous options from the Tab
By default, the tabs shrink to fit within the available tab strip space. This can be changed via the Advanced
Tab Strip Placement
The tab strip can be located on any side (left, top, right, bottom) of the tab control. Use the TabStripPlacement
property to adjust the side as needed.
Tab Content Orientation
Tabs will normally always display their content in a horizontal orientation, even when the tab strip placement is on the left or right.
Tab content can be rotated to a vertical orientation by setting the Advancedfalse
.
Tab Control Appearance
The tab control has several properties that adjust its own appearance.
Tab Strip Visibility
The tab strip can be hidden by setting the Advancedfalse
.
Highlight
The tab strip can display an optional highlight border around its outside. The border thickness is set by the Advanced
Flagging as Active
The Advancedtrue
when the focus moves within the tab control. The active setting affects which brushes are used for highlight effects and tab rendering.
Tab Appearance
Numerous properties allow you to completely customize the appearance of tabs in the tab control.
Background, Border, and Foreground
There are numerous variations of properties like Advanced
Likewise, similar sets of layout kind and state properties are available for Tab
Corner Radius
The Advanced
Padding
The Advanced
Spacing
The Advanced0
, determines the amount of space between each tab. Set it to a negative value to have tabs overlap each other.
Minimum and Maximum Extents
The Advanced
Side Slant
The Advanced
Highlighting Inactive Tabs on Pointer Over
The Advancedfalse
.
New Tab Button
A New Tab button can be displayed by setting the Advancedtrue
. The New Tab button appears just to the right of the normal tabs. It is recommended that one of the shrink-related overflow behaviors is used when a New Tab button is present.
The style of the button can be set with the New
When the button is clicked, the New
Embedded Buttons
The tab control and its tabs can embed several buttons. Tab control embedded buttons generally display in response to the tab overflow behavior setting. Several tab embedded buttons depend on the tab's layout kind and other options like Advanced
Some tab embedded buttons are only visible when the tab is selected or in a pointer over state. The Advanced
The AdvancedStyle
of tab control embedded buttons, while the TabStyle
of tab embedded buttons.
The AdvancedDataTemplate
of the related tab control embedded buttons.
Tab Closing
Tabs can close when their embedded close button is clicked or also on middle-click if the Advancedtrue
. These features also require that the Advancedtrue
.
When a tab is about to close, it raises the AdvancedCancel
flag is set to true
in the event arguments, the close will not occur. This event is a good place to prompt the end user about unsaved changes, etc.
Tab Dragging to Reorder
While tabs do support dragging to reorder themselves, the feature is not enabled by default. To enable this behavior, set the Advancedtrue
.
Tab Selection on System Drag Over
By default, performing a system drag over a tab (e.g., text drag, file drag) will select the tab so that the dragged content can be dropped on a control on the tab's content area. To disable this feature, set the Advancedfalse
.
Layout Animation
By default, animation effects are applied during layout, such as when tabs are added or removed from the tab control. To disable these animation effects, set the Advancedfalse
.
Menus
The Advanced
Keyboard Shortcuts
When the Advancedtrue
(the default), the Ctrl+Tab gesture will switch to the next tab and the Ctrl+Shift+Tab gesture will switch to the previous tab.
When the Advancedtrue
(the default), keyboard access to directly select a tab is enabled. The number keys 1 through 8 identify tab position and are combined with specific modifier keys to distinguish between normal, pinned, or preview tab states. The number key 9 is used to indicate the last tab instead of the ninth tab.
Key | Description |
---|---|
Ctrl+1 through 8 | Activate the tabs in a normal state based on position. For instance, Ctrl+2 activates the second tab in a normal state. |
Ctrl+9 | Activates the last tab in a normal state. |
Ctrl+Alt+1 through 8 | Activate the tabs in a pinned state based on position. For instance, Ctrl+Alt+2 activates the second tab in a pinned state. |
Ctrl+Alt+9 | Activates the last tab in a pinned state. |
Ctrl+Shift+1 through 8 | Activate the tabs in a preview state based on position. For instance, Ctrl+Shift+2 activates the second tab in a preview state. |
Ctrl+Shift+9 | Activates the last tab in a preview state. |