Represents a tab control with advanced features.
- Inheritance:
-
object
Visual
UIElement
Framework
Element Control ItemsControl Selector TabControl object
Constructors
AdvancedTabControl()
Initializes an instance of the AdvancedTabControl
class.
Properties
AreScrollButtonsVisible
Gets whether the scroll buttons are visible.
Property Value
- bool:
true
if the scroll buttons are visible; otherwise,false
. The default value isfalse
.
AreTabEmbeddedButtonsAlwaysVisible
Gets or sets whether tab embedded buttons are always visible, even when the tab is unselected.
Property Value
- bool:
true
if tab embedded buttons are always visible, even when the tab is unselected; otherwise,false
. The default value isfalse
.
CanScrollBackward
Gets whether scrolling backward is supported.
Property Value
- bool:
true
if scrolling backward is supported; otherwise,false
. The default value isfalse
.
CanScrollForward
Gets whether scrolling forward is supported.
Property Value
- bool:
true
if scrolling forward is supported; otherwise,false
. The default value isfalse
.
CanTabsCloseOnMiddleClick
Gets or sets whether tabs can close when a middle-click is performed over them.
Property Value
- bool:
true
if tabs can close when a middle-click is performed over them; otherwise,false
. The default value isfalse
.
Remarks
The Cantrue
for this behavior to work.
CanTabsDrag
Gets or sets whether the dragging of tabs to reorder is enabled.
Property Value
- bool:
true
if the dragging of tabs to reorder is enabled; otherwise,false
. The default value isfalse
.
CanTabsHighlightOnPointerOverWhenInactive
Gets or sets whether tabs can highlight when the pointer is over inactive ones.
Property Value
- bool:
true
if tabs can highlight when the pointer is over inactive ones; otherwise,false
. The default value isfalse
.
CanTabsPin
Gets or sets whether tabs display an embedded pin button.
Property Value
- bool:
true
if tabs display an embedded pin button; otherwise,false
. The default value isfalse
.
CanTabsPromote
Gets or sets whether tabs display an embedded promote from preview layout kind button.
Property Value
- bool:
true
if tabs display an embedded promote from preview layout kind button; otherwise,false
. The default value istrue
.
CanTabsSelectOnDragOver
Gets or sets whether tabs can be selected when performing a system (e.g. text, file) drag over them.
Property Value
- bool:
true
if tabs can be selected when performing a system (e.g. text, file) drag over them; otherwise,false
. The default value istrue
.
EmbeddedButtonStyle
Gets or sets the Style to use for embedded buttons.
HasNewTabButton
Gets or sets whether a new tab button is available.
Property Value
- bool:
true
if a new tab button is visible; otherwise,false
. The default value isfalse
.
HasTabCloseButtons
Gets or sets whether tabs have an embedded close button.
Property Value
- bool:
true
if tabs have an embedded close button; otherwise,false
. The default value isfalse
.
Remarks
The Cantrue
for the button to show.
HasTabImages
Gets or sets whether tabs display an embedded image when one is available.
Property Value
- bool:
true
if tabs display an embedded image when one is available; otherwise,false
. The default value isfalse
.
HeaderBackground
Gets or sets the background Brush for the header area behind the tabs and buttons.
HighlightBrushActive
Gets or sets the Brush to use for rendering an active highlight effect around the content border.
Property Value
HighlightBrushInactive
Gets or sets the Brush to use for rendering an inactive highlight effect around the content border.
Property Value
HighlightThickness
Gets or sets the thickness of the highlight effect around the content border.
Property Value
- Thickness:
The thickness of the highlight effect around the content border. The default value is
0
.
IsActive
Gets or sets whether the tab control is active, generally meaning it contains focus.
Property Value
- bool:
true
if the tab control is active; otherwise,false
. The default value isfalse
.
IsLayoutAnimationEnabled
Gets or sets whether animation effects are applied during layout, such as when tabs are added or removed.
Property Value
- bool:
true
if animation effects are applied during layout, such as when tabs are added or removed; otherwise,false
. The default value istrue
.
IsMenuButtonVisible
Gets whether the drop-down menu button is visible.
Property Value
- bool:
true
if the drop-down menu button is visible; otherwise,false
. The default value isfalse
.
IsOverflowed
Gets whether the tabs are overflowed.
Property Value
- bool:
true
if the tabs are overflowed; otherwise,false
.
IsTabContentHorizontal
Gets or sets whether the tab content layout is in a horizontal orientation.
Property Value
- bool:
true
if the tab content layout is in a horizontal orientation; otherwise,false
. The default value istrue
.
IsTabKeyboardAccessEnabled
Gets or sets whether keyboard access to directly select a tab is enabled.
Property Value
- bool:
true
if keyboard access to directly select a tab is enabled; otherwise,false
. The default value istrue
.
Remarks
When enabled, Ctrl+1
will activate the first tab in a normal state, with Ctrl+2
activating the second normal tab, and so on.
Ctrl+Alt+1
will activate the first tab in a pinned state, with Ctrl+Alt+2
activating the second pinned tab, and so on.
IsTabKeyboardSwitchingEnabled
Gets or sets whether keyboard access to switch to the previous/next tab is enabled.
Property Value
- bool:
true
if keyboard access to switch to the previous/next tab is enabled; otherwise,false
. The default value istrue
.
Remarks
When enabled, Ctrl+Tab
will switch to the next tab and Ctrl+Shift+Tab
will switch to the previous tab.
IsTabStripVisible
Gets or sets whether the tabstrip is visible.
Property Value
- bool:
true
if the tabstrip is visible; otherwise,false
. The default value istrue
.
MaxTabExtent
Gets or sets the maximum extent of a tab.
Property Value
- double:
The maximum extent of a tab. The default value is
260.0
.
Remarks
Set the Min
MenuButtonContentTemplate
Gets or sets the Data
Property Value
- Data
Template : The Data
Template to use for the drop-down menu button content.
MinTabExtent
Gets or sets the minimum extent of a tab.
Property Value
- double:
The minimum extent of a tab. The default value is
30.0
.
Remarks
Set the Min
NewTabButtonStyle
Gets or sets the Style to use for the new tab button.
OverflowMenuButtonContentTemplate
Gets or sets the Data
Property Value
- Data
Template : The Data
Template to use for the overflow drop-down menu button content.
RequestNewTabCommand
Gets the ICommand that can be used to request a new tab.
RotatedBorderThickness
Gets or sets the BorderThickness
value, but automatically rotated based on the TabStripPlacement
.
Property Value
- Thickness:
The
BorderThickness
value, but automatically rotated based on theTabStripPlacement
. The default value is0
.
Remarks
This property should not be set, as it will be set internally.
RotatedHighlightThickness
Gets or sets the HighlightThickness
value, but automatically rotated based on the TabStripPlacement
.
Property Value
- Thickness:
The
HighlightThickness
value, but automatically rotated based on theTabStripPlacement
. The default value is0
.
Remarks
This property should not be set, as it will be set internally.
RotatedPadding
Gets or sets the Padding
value, but automatically rotated based on the TabStripPlacement
.
Property Value
- Thickness:
The
Padding
value, but automatically rotated based on theTabStripPlacement
. The default value is0
.
Remarks
This property should not be set, as it will be set internally.
ScrollBackwardButtonContentTemplate
Gets or sets the Data
Property Value
- Data
Template : The Data
Template to use for the scroll backward content.
ScrollBackwardCommand
Gets the ICommand that can be used to scroll backward.
ScrollForwardButtonContentTemplate
Gets or sets the Data
Property Value
- Data
Template : The Data
Template to use for the scroll forward content.
ScrollForwardCommand
Gets the ICommand that can be used to scroll forward.
ScrollOffset
Gets the scroll offset.
Property Value
- double:
The scroll offset.
SelectItemCommand
Gets the ICommand that can be used to select an item.
TabBackground
Gets or sets the tabs' background Brush to use.
TabBackgroundActiveSelected
Gets or sets the tabs' background Brush to use when the tab is selected and its content is active.
TabBackgroundInactiveSelected
Gets or sets the tabs' background Brush to use when the tab is selected and its content is inactive.
TabBackgroundPointerOver
Gets or sets the tabs' background Brush to use when the pointer is over it.
TabBackgroundPreview
Gets or sets the tabs' background Brush to use when the tab is a preview tab.
TabBackgroundPreviewActiveSelected
Gets or sets the tabs' background Brush to use when the tab is a preview tab, is selected, and its content is active.
TabBackgroundPreviewPointerOver
Gets or sets the tabs' border Brush to use when the tab is a preview tab and the pointer is over it.
TabBorderBrush
Gets or sets the tabs' border Brush to use.
TabBorderBrushActiveSelected
Gets or sets the tabs' border Brush to use when the tab is selected and its content is active.
TabBorderBrushInactiveSelected
Gets or sets the tabs' border Brush to use when the tab is selected and its content is inactive.
TabBorderBrushPointerOver
Gets or sets the tabs' border Brush to use when the pointer is over it.
TabBorderBrushPreview
Gets or sets the tabs' border Brush to use when the tab is a preview tab.
TabBorderBrushPreviewActiveSelected
Gets or sets the tabs' border Brush to use when the tab is a preview tab, is selected, and its content is active.
TabBorderBrushPreviewPointerOver
Gets or sets the tabs' border Brush to use when the tab is a preview tab and the pointer is over it.
TabCornerRadius
Gets or sets the corner radius of tab borders, relative to a top-facing tab.
Property Value
- Corner
Radius : The corner radius of tab borders, relative to a top-facing tab.
TabEmbeddedButtonStyle
Gets or sets the Style to use for embedded buttons within tabs.
TabFarSlantExtent
Gets or sets the far side slant extent of the tabs.
Property Value
- double:
The far side slant extent of the tabs, or
0.0
for no slant. The default value is0.0
.
TabForeground
Gets or sets the tabs' foreground Brush to use.
TabForegroundActiveSelected
Gets or sets the tabs' foreground Brush to use when the tab is selected and its content is active.
TabForegroundInactiveSelected
Gets or sets the tabs' foreground Brush to use when the tab is selected and its content is inactive.
TabForegroundPointerOver
Gets or sets the tabs' foreground Brush to use when the pointer is over it.
TabForegroundPreview
Gets or sets the tabs' foreground Brush to use when the tab is a preview tab.
TabForegroundPreviewActiveSelected
Gets or sets the tabs' foreground Brush to use when the tab is a preview tab, is selected, and its content is active.
TabForegroundPreviewPointerOver
Gets or sets the tabs' foreground Brush to use when the tab is a preview tab and the pointer is over it.
TabNearSlantExtent
Gets or sets the near side slant extent of the tabs.
Property Value
- double:
The near side slant extent of the tabs, or
0.0
for no slant. The default value is0.0
.
TabOverflowBehavior
Gets or sets the Tab
Property Value
- Tab
Overflow :Behavior The Tab
Overflow that indicates the logic to use in tab overflow scenarios. The default value isBehavior Shrink
.
TabPadding
Gets or sets the tab padding.
Property Value
- Thickness:
The tab padding. The default value is
5,2
.
TabSpacing
Gets or sets the spacing between tabs.
Property Value
- double:
The spacing between tabs. The default value is
0.0
.
UseDefaultFocusHandling
Gets or sets whether to use default TabItem
focus handling.
Property Value
- bool:
true
if defaultTabItem
focus handling should be used; otherwise,false
. The default value istrue
.
Methods
ArrangeOverride(Size)
When overridden in a derived class, positions child elements and determines a size for a Framework
Parameter | Type | Description |
---|---|---|
finalSize | Size | The final area within the parent that this element should use to arrange itself and its children. |
Returns
- Size:
The actual size used.
ClearContainerForItemOverride(DependencyObject, object)
Removes the effects of a Prepare
Parameter | Type | Description |
---|---|---|
element | DependencyObject | The System.Windows.DependencyObject that is the wrapper element. |
item | object | The item that is being wrapped. |
GetContainerForItemOverride()
Creates or identifies the element used to display the specified item.
Returns
- DependencyObject:
The element that is used to display the given item.
IsItemItsOwnContainerOverride(object)
Determines if the specified item is (or is eligible to be) its own item container.
Parameter | Type | Description |
---|---|---|
item | object | Specified item. |
Returns
- bool:
true
if the item is its own item container; otherwise,false
.
OnApplyTemplate()
Invoked whenever application code or internal processes call ApplyTemplate
.
OnCreateAutomationPeer()
Returns an Automation
Returns
- Automation
Peer : An Automation
Peer instance.
OnKeyDown(KeyEventArgs)
Occurs when a key is pressed.
Parameter | Type | Description |
---|---|---|
e | Key |
The Key |
OnRenderSizeChanged(SizeChangedInfo)
Occurs when the control's size is changed.
Parameter | Type | Description |
---|---|---|
sizeInfo | Size |
The size change info. |
OnSelectionChanged(SelectionChangedEventArgs)
Occurs when the selection has changed.
Parameter | Type | Description |
---|---|---|
e | Selection |
The |
PrepareContainerForItemOverride(DependencyObject, object)
Prepares the specified element to display the specified item.
Parameter | Type | Description |
---|---|---|
element | DependencyObject | The System.Windows.DependencyObject that is the wrapper element. |
item | object | The item that is being wrapped. |
UpdateHighlightBrushes()
Optionally updates the Highlight
Remarks
The default implementation of this method does nothing.
Events
MenuOpening
Occurs before a context or drop-down menu is opening.
Event Type
NewTabRequested
Occurs when a new tab is requested.
Event Type
TabClosing
Occurs before a tab is closed due to clicking on its close button.
Event Type
TabDragReordered
Occurs when a tab is reordered using internal drag/drop.
Event Type
Fields
AreScrollButtonsVisibleProperty
Identifies the Are
AreTabEmbeddedButtonsAlwaysVisibleProperty
Identifies the Are
CanScrollBackwardProperty
Identifies the Can
CanScrollForwardProperty
Identifies the Can
CanTabsCloseOnMiddleClickProperty
Identifies the Can
CanTabsDragProperty
Identifies the Can
CanTabsHighlightOnPointerOverWhenInactiveProperty
Identifies the Can
CanTabsPinProperty
Identifies the Can
CanTabsPromoteProperty
Identifies the Can
CanTabsSelectOnDragOverProperty
Identifies the Can
EmbeddedButtonStyleProperty
Identifies the Embedded
HasNewTabButtonProperty
Identifies the Has
HasTabCloseButtonsProperty
Identifies the Has
HasTabImagesProperty
Identifies the Has
HeaderBackgroundProperty
Identifies the Header
HighlightBrushActiveProperty
Identifies the Highlight
HighlightBrushInactiveProperty
Identifies the Highlight
HighlightThicknessProperty
Identifies the Highlight
IsActiveProperty
Identifies the Is
IsLayoutAnimationEnabledProperty
Identifies the Is
IsMenuButtonVisibleProperty
Identifies the Is
IsOverflowedProperty
Identifies the Is
IsTabContentHorizontalProperty
Identifies the Is
IsTabKeyboardAccessEnabledProperty
Identifies the Is
IsTabKeyboardSwitchingEnabledProperty
Identifies the Is
IsTabStripVisibleProperty
Identifies the Is
MaxTabExtentProperty
Identifies the Max
MenuButtonContentTemplateProperty
Identifies the Menu
MinTabExtentProperty
Identifies the Min
NewTabButtonStyleProperty
Identifies the New
OverflowMenuButtonContentTemplateProperty
Identifies the Overflow
RotatedBorderThicknessProperty
Identifies the Rotated
RotatedHighlightThicknessProperty
Identifies the Rotated
RotatedPaddingProperty
Identifies the Rotated
ScrollBackwardButtonContentTemplateProperty
Identifies the Scroll
ScrollForwardButtonContentTemplateProperty
Identifies the Scroll
ScrollOffsetProperty
Identifies the Scroll
TabBackgroundActiveSelectedProperty
Identifies the Tab
TabBackgroundInactiveSelectedProperty
Identifies the Tab
TabBackgroundPointerOverProperty
Identifies the Tab
TabBackgroundPreviewActiveSelectedProperty
Identifies the Tab
TabBackgroundPreviewPointerOverProperty
Identifies the Tab
TabBackgroundPreviewProperty
Identifies the Tab
TabBackgroundProperty
Identifies the Tab
TabBorderBrushActiveSelectedProperty
Identifies the Tab
TabBorderBrushInactiveSelectedProperty
Identifies the Tab
TabBorderBrushPointerOverProperty
Identifies the Tab
TabBorderBrushPreviewActiveSelectedProperty
Identifies the Tab
TabBorderBrushPreviewPointerOverProperty
Identifies the Tab
TabBorderBrushPreviewProperty
Identifies the Tab
TabBorderBrushProperty
Identifies the Tab
TabCornerRadiusProperty
Identifies the Tab
TabEmbeddedButtonStyleProperty
Identifies the Tab
TabFarSlantExtentProperty
Identifies the Tab
TabForegroundActiveSelectedProperty
Identifies the Tab
TabForegroundInactiveSelectedProperty
Identifies the Tab
TabForegroundPointerOverProperty
Identifies the Tab
TabForegroundPreviewActiveSelectedProperty
Identifies the Tab
TabForegroundPreviewPointerOverProperty
Identifies the Tab
TabForegroundPreviewProperty
Identifies the Tab
TabForegroundProperty
Identifies the Tab
TabNearSlantExtentProperty
Identifies the Tab
TabOverflowBehaviorProperty
Identifies the Tab
TabPaddingProperty
Identifies the Tab
TabSpacingProperty
Identifies the Tab
UseDefaultFocusHandlingProperty
Identifies the Use