AdvancedTabItem Class
Represents a tab item for use in an AdvancedTabControl.
[TemplateVisualState(Name = "None", GroupName = "HighlightStates")]
[TemplateVisualState(Name = "PointerOver", GroupName = "HighlightStates")]
[TemplateVisualState(Name = "ActiveSelected", GroupName = "HighlightStates")]
[TemplateVisualState(Name = "InactiveSelected", GroupName = "HighlightStates")]
[TemplateVisualState(Name = "Preview", GroupName = "HighlightStates")]
[TemplateVisualState(Name = "PreviewActiveSelected", GroupName = "HighlightStates")]
[TemplateVisualState(Name = "PreviewPointerOver", GroupName = "HighlightStates")]
[TemplateVisualState(Name = "NormalLayout", GroupName = "LayoutKindStates")]
[TemplateVisualState(Name = "PinnedLayout", GroupName = "LayoutKindStates")]
[TemplateVisualState(Name = "PreviewLayout", GroupName = "LayoutKindStates")]
[TemplateVisualState(Name = "Editable", GroupName = "ReadOnlyStates")]
[TemplateVisualState(Name = "ReadOnly", GroupName = "ReadOnlyStates")]
public class AdvancedTabItem : TabItem
- Inheritance:
- object Visual UIElement FrameworkElement Control ContentControl HeaderedContentControl TabItem object
- Derived:
- DockingWindowContainerTabItem
Constructors
AdvancedTabItem()
Initializes an instance of the class.
public AdvancedTabItem()
Properties
AreEmbeddedButtonsAlwaysVisible
Indicates whether embedded buttons are always visible, even when the tab is unselected.
public bool AreEmbeddedButtonsAlwaysVisible { get; set; }
Property Value
- bool:
The default value is
false.
ArrangeHeightAnimated
The arrange height of the tab. This property is for internal use only.
ArrangeWidthAnimated
The arrange width of the tab. This property is for internal use only.
ArrangeXAnimated
The arrange x-coordinate of the tab. This property is for internal use only.
ArrangeYAnimated
The arrange y-coordinate of the tab. This property is for internal use only.
BackgroundActiveSelected
The control's background Brush to use when the tab is selected and its content is active.
BackgroundInactiveSelected
The control's background Brush to use when the tab is selected and its content is inactive.
BackgroundPointerOver
The control's background Brush to use when the pointer is over it.
BackgroundPreview
The control's background Brush to use when the tab is a preview tab.
BackgroundPreviewActiveSelected
The control's background Brush to use when the tab is a preview tab, is selected, and its content is active.
BackgroundPreviewPointerOver
The control's border Brush to use when the tab is a preview tab and the pointer is over it.
BorderBrushActiveSelected
The control's border Brush to use when the tab is selected and its content is active.
BorderBrushInactiveSelected
The control's border Brush to use when the tab is selected and its content is inactive.
BorderBrushPointerOver
The control's border Brush to use when the pointer is over it.
BorderBrushPreview
The control's border Brush to use when the tab is a preview tab.
BorderBrushPreviewActiveSelected
The control's border Brush to use when the tab is a preview tab, is selected, and its content is active.
BorderBrushPreviewPointerOver
The control's border Brush to use when the tab is a preview tab and the pointer is over it.
CanClose
Indicates whether the tab displays an embedded close button.
CanHighlightOnPointerOverWhenInactive
Indicates whether the tab can highlight when the pointer is over it and it is inactive.
public bool CanHighlightOnPointerOverWhenInactive { get; set; }
Property Value
- bool:
The default value is
false.
CanPin
Indicates whether the tab displays an embedded pin button.
CanPromote
Indicates whether the tab displays an embedded promote from preview layout kind button.
CloseButtonContentTemplate
The DataTemplate to use for the close button content.
CloseCommand
The ICommand that can be used to close the tab.
ContextContent
The contextual content to display.
ContextContentTemplate
The DataTemplate to use for displaying contextual content.
CornerRadius
The corner radius of the tab border, relative to a top-facing tab.
EmbeddedButtonStyle
The Style to use for embedded buttons.
FarSlantExtent
The far side slant extent of the tab, or 0.0 for no slant.
FlashColor
The flash color to use if flashing is enabled.
FlashMode
The flash mode for the tab.
ForegroundActiveSelected
The control's foreground Brush to use when the tab is selected and its content is active.
ForegroundInactiveSelected
The control's foreground Brush to use when the tab is selected and its content is inactive.
ForegroundPointerOver
The control's foreground Brush to use when the pointer is over it.
ForegroundPreview
The control's foreground Brush to use when the tab is a preview tab.
ForegroundPreviewActiveSelected
The control's foreground Brush to use when the tab is a preview tab, is selected, and its content is active.
ForegroundPreviewPointerOver
The control's foreground Brush to use when the tab is a preview tab and the pointer is over it.
HasCloseButton
Indicates whether the tab has an embedded close button based on its current state.
public bool HasCloseButton { get; }
Property Value
- bool:
The default value is
false.
Remarks
When this property is true, space is reserved in the tab for the close button.
The actual visibility of the close button depends on the IsCloseButtonVisible property.
HasToggleLayoutKindButton
Indicates whether the tab has an embedded toggle layout kind button based on its current state.
public bool HasToggleLayoutKindButton { get; }
Property Value
- bool:
The default value is
false.
Remarks
When this property is true, space is reserved in the tab for the toggle layout kind button.
The actual visibility of the toggle layout kind button depends on the IsToggleLayoutKindButtonVisible property.
HighlightKind
The TabHighlightKind indicating the kind of highlight to apply to the tab.
public TabHighlightKind HighlightKind { get; }
Property Value
- TabHighlightKind:
The default value is None.
ImageSource
A ImageSource for an image that renders on the tab.
IsCloseButtonVisible
Indicates whether the embedded close button is visible.
IsContentHorizontal
Indicates whether the content layout is in a horizontal orientation.
IsImageVisible
Indicates whether the embedded image is visible.
IsLoadAnimationEnabled
Indicates whether animation effects may be applied when the tab is loaded.
IsReadOnly
Indicates whether the tab's contents are read-only.
IsToggleLayoutKindButtonVisible
Indicates whether the embedded toggle layout kind button is visible.
public bool IsToggleLayoutKindButtonVisible { get; }
Property Value
- bool:
The default value is
false.
LayoutKind
The TabLayoutKind that indicates how the tab will be positioned.
public TabLayoutKind LayoutKind { get; set; }
Property Value
- TabLayoutKind:
The default value is Normal.
NearSlantExtent
The near side slant extent of the tab, or 0.0 for no slant.
PinButtonContentTemplate
The DataTemplate to use for the pin button content.
PromoteButtonContentTemplate
The DataTemplate to use for the promote button content.
ReadOnlyContextContentTemplate
The DataTemplate to assign to ContextContentTemplate when the IsReadOnly property is true.
TintColor
The tint color applied to the Background and BorderBrush brushes.
public Color TintColor { get; set; }
Property Value
- Color:
The default value is
Transparent, which indicates no tinting should be applied.
ToggleLayoutKindCommand
The ICommand that can be used to toggle the tab's layout kind.
UnpinButtonContentTemplate
The DataTemplate to use for the unpin button content.
Methods
Activate()
Activates the tab by selecting it (if unselected), ensuring that it is visible, and focusing the content within it.
public void Activate()
Close()
Closes the tab, removing it from the containing tab control.
public void Close()
DragMove(InputPointerButtonEventArgs)
Starts a drag/move.
public void DragMove(InputPointerButtonEventArgs sourceEventArgs)
| Parameter | Type | Description |
|---|---|---|
| sourceEventArgs | InputPointerButtonEventArgs | The source InputPointerButtonEventArgs, which can be used to capture the pointer. |
Remarks
The primary button of the pointer in the event arguments must be pressed down when calling this method. The pointer will be captured.
OnApplyTemplate()
When overridden in a derived class, is invoked whenever application code or internal processes call ApplyTemplate().
public override void OnApplyTemplate()
OnContextMenuOpening(ContextMenuEventArgs)
Invoked whenever an unhandled ContextMenuOpening routed event reaches this class in its route. Implement this method to add class handling for this event.
protected override void OnContextMenuOpening(ContextMenuEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | ContextMenuEventArgs | The RoutedEventArgs that contains the event data. |
OnCreateAutomationPeer()
Provides an appropriate TabItemAutomationPeer implementation for this control, as part of the WPF automation infrastructure.
protected override AutomationPeer OnCreateAutomationPeer()
Returns
- AutomationPeer:
The type-specific AutomationPeer implementation.
OnDragEnter(DragEventArgs)
Invoked when an unhandled System.Windows.DragDrop.DragEnter attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnDragEnter(DragEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | DragEventArgs | The DragEventArgs that contains the event data. |
OnDragOver(DragEventArgs)
Invoked when an unhandled System.Windows.DragDrop.DragOver attached event reaches an element in its route that is derived from this class. Implement this method to add class handling for this event.
protected override void OnDragOver(DragEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | DragEventArgs | The DragEventArgs that contains the event data. |
OnMouseLeftButtonDown(MouseButtonEventArgs)
Responds to the MouseLeftButtonDown event.
protected override void OnMouseLeftButtonDown(MouseButtonEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | MouseButtonEventArgs | Provides data for MouseButtonEventArgs. |
OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs)
Announces that the keyboard is focused on this element.
protected override void OnPreviewGotKeyboardFocus(KeyboardFocusChangedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | KeyboardFocusChangedEventArgs | Keyboard input event arguments. |
OnSelected(RoutedEventArgs)
Called to indicate that the IsSelected property has changed to true.
protected override void OnSelected(RoutedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | RoutedEventArgs | The event data for the System.Windows.Controls.Primitives.Selector.Selected event. |
OnUnselected(RoutedEventArgs)
Called to indicate that the IsSelected property has changed to false.
protected override void OnUnselected(RoutedEventArgs e)
| Parameter | Type | Description |
|---|---|---|
| e | RoutedEventArgs | The event data for the System.Windows.Controls.Primitives.Selector.Unselected event. |
ToggleLayoutKind()
Toggles the tab's LayoutKind.
public void ToggleLayoutKind()
Remarks
Normal tabs will switch to Pinned layout. All other layout kinds switch back to Normal.
Fields
AreEmbeddedButtonsAlwaysVisibleProperty
Defines the AreEmbeddedButtonsAlwaysVisible property.
public static readonly DependencyProperty AreEmbeddedButtonsAlwaysVisibleProperty
ArrangeHeightAnimatedProperty
Defines the ArrangeHeightAnimated property.
public static readonly DependencyProperty ArrangeHeightAnimatedProperty
ArrangeWidthAnimatedProperty
Defines the ArrangeWidthAnimated property.
public static readonly DependencyProperty ArrangeWidthAnimatedProperty
ArrangeXAnimatedProperty
Defines the ArrangeXAnimated property.
public static readonly DependencyProperty ArrangeXAnimatedProperty
ArrangeYAnimatedProperty
Defines the ArrangeYAnimated property.
public static readonly DependencyProperty ArrangeYAnimatedProperty
BackgroundActiveSelectedProperty
Defines the BackgroundActiveSelected property.
public static readonly DependencyProperty BackgroundActiveSelectedProperty
BackgroundInactiveSelectedProperty
Defines the BackgroundInactiveSelected property.
public static readonly DependencyProperty BackgroundInactiveSelectedProperty
BackgroundPointerOverProperty
Defines the BackgroundPointerOver property.
public static readonly DependencyProperty BackgroundPointerOverProperty
BackgroundPreviewActiveSelectedProperty
Defines the BackgroundPreviewActiveSelected property.
public static readonly DependencyProperty BackgroundPreviewActiveSelectedProperty
BackgroundPreviewPointerOverProperty
Defines the BackgroundPreviewPointerOver property.
public static readonly DependencyProperty BackgroundPreviewPointerOverProperty
BackgroundPreviewProperty
Defines the BackgroundPreview property.
public static readonly DependencyProperty BackgroundPreviewProperty
BorderBrushActiveSelectedProperty
Defines the BorderBrushActiveSelected property.
public static readonly DependencyProperty BorderBrushActiveSelectedProperty
BorderBrushInactiveSelectedProperty
Defines the BorderBrushInactiveSelected property.
public static readonly DependencyProperty BorderBrushInactiveSelectedProperty
BorderBrushPointerOverProperty
Defines the BorderBrushPointerOver property.
public static readonly DependencyProperty BorderBrushPointerOverProperty
BorderBrushPreviewActiveSelectedProperty
Defines the BorderBrushPreviewActiveSelected property.
public static readonly DependencyProperty BorderBrushPreviewActiveSelectedProperty
BorderBrushPreviewPointerOverProperty
Defines the BorderBrushPreviewPointerOver property.
public static readonly DependencyProperty BorderBrushPreviewPointerOverProperty
BorderBrushPreviewProperty
Defines the BorderBrushPreview property.
public static readonly DependencyProperty BorderBrushPreviewProperty
CanCloseProperty
Defines the CanClose property.
public static readonly DependencyProperty CanCloseProperty
CanHighlightOnPointerOverWhenInactiveProperty
Defines the CanHighlightOnPointerOverWhenInactive property.
public static readonly DependencyProperty CanHighlightOnPointerOverWhenInactiveProperty
CanPinProperty
Defines the CanPin property.
public static readonly DependencyProperty CanPinProperty
CanPromoteProperty
Defines the CanPromote property.
public static readonly DependencyProperty CanPromoteProperty
CloseButtonContentTemplateProperty
Defines the CloseButtonContentTemplate property.
public static readonly DependencyProperty CloseButtonContentTemplateProperty
ContextContentProperty
Defines the ContextContent property.
public static readonly DependencyProperty ContextContentProperty
ContextContentTemplateProperty
Defines the ContextContentTemplate property.
public static readonly DependencyProperty ContextContentTemplateProperty
CornerRadiusProperty
Defines the CornerRadius property.
public static readonly DependencyProperty CornerRadiusProperty
EmbeddedButtonStyleProperty
Defines the EmbeddedButtonStyle property.
public static readonly DependencyProperty EmbeddedButtonStyleProperty
FarSlantExtentProperty
Defines the FarSlantExtent property.
public static readonly DependencyProperty FarSlantExtentProperty
FlashColorProperty
Defines the FlashColor property.
public static readonly DependencyProperty FlashColorProperty
FlashModeProperty
Defines the FlashMode property.
public static readonly DependencyProperty FlashModeProperty
ForegroundActiveSelectedProperty
Defines the ForegroundActiveSelected property.
public static readonly DependencyProperty ForegroundActiveSelectedProperty
ForegroundInactiveSelectedProperty
Defines the ForegroundInactiveSelected property.
public static readonly DependencyProperty ForegroundInactiveSelectedProperty
ForegroundPointerOverProperty
Defines the ForegroundPointerOver property.
public static readonly DependencyProperty ForegroundPointerOverProperty
ForegroundPreviewActiveSelectedProperty
Defines the ForegroundPreviewActiveSelected property.
public static readonly DependencyProperty ForegroundPreviewActiveSelectedProperty
ForegroundPreviewPointerOverProperty
Defines the ForegroundPreviewPointerOver property.
public static readonly DependencyProperty ForegroundPreviewPointerOverProperty
ForegroundPreviewProperty
Defines the ForegroundPreview property.
public static readonly DependencyProperty ForegroundPreviewProperty
HasCloseButtonProperty
Defines the HasCloseButton property.
public static readonly DependencyProperty HasCloseButtonProperty
HasToggleLayoutKindButtonProperty
Defines the HasToggleLayoutKindButton property.
public static readonly DependencyProperty HasToggleLayoutKindButtonProperty
HighlightKindProperty
Defines the HighlightKind property.
public static readonly DependencyProperty HighlightKindProperty
ImageSourceProperty
Defines the ImageSource property.
public static readonly DependencyProperty ImageSourceProperty
IsCloseButtonVisibleProperty
Defines the IsCloseButtonVisible property.
public static readonly DependencyProperty IsCloseButtonVisibleProperty
IsContentHorizontalProperty
Defines the IsContentHorizontal property.
public static readonly DependencyProperty IsContentHorizontalProperty
IsImageVisibleProperty
Defines the IsImageVisible property.
public static readonly DependencyProperty IsImageVisibleProperty
IsLoadAnimationEnabledProperty
Defines the IsLoadAnimationEnabled property.
public static readonly DependencyProperty IsLoadAnimationEnabledProperty
IsReadOnlyProperty
Defines the IsReadOnly property.
public static readonly DependencyProperty IsReadOnlyProperty
IsToggleLayoutKindButtonVisibleProperty
Defines the IsToggleLayoutKindButtonVisible property.
public static readonly DependencyProperty IsToggleLayoutKindButtonVisibleProperty
LayoutKindProperty
Defines the LayoutKind property.
public static readonly DependencyProperty LayoutKindProperty
NearSlantExtentProperty
Defines the NearSlantExtent property.
public static readonly DependencyProperty NearSlantExtentProperty
PinButtonContentTemplateProperty
Defines the PinButtonContentTemplate property.
public static readonly DependencyProperty PinButtonContentTemplateProperty
PromoteButtonContentTemplateProperty
Defines the PromoteButtonContentTemplate property.
public static readonly DependencyProperty PromoteButtonContentTemplateProperty
ReadOnlyContextContentTemplateProperty
Defines the ReadOnlyContextContentTemplate property.
public static readonly DependencyProperty ReadOnlyContextContentTemplateProperty
TintColorProperty
Defines the TintColor property.
public static readonly DependencyProperty TintColorProperty
UnpinButtonContentTemplateProperty
Defines the UnpinButtonContentTemplate property.
public static readonly DependencyProperty UnpinButtonContentTemplateProperty