TabView
Namespace: FluentAvalonia.UI.Controls
A control used to display a set of tabs and their respective content
C#
public class TabView : TemplatedControl
Xaml
<ui:TabView />
Required Template Parts
Name | Control Type |
---|---|
TabContentPresenter | ContentPresenter |
RightContentPresenter | ContentPresenter |
TabContainerGrid | Grid |
TabListView | TabViewListView |
AddButton | Button |
Pseudoclasses
:noborder, :borderLeft, :borderRight, :singleBorder, :disabled, :focus, :focus-visible, :focus-within, :pointerover
Examples and Usage Notes
None yet.
API
Note: Inherited members are not shown
Properties
AddTabButtonCommand | Gets or sets the command to onvoke when the add (+) tab button is tapped |
AddTabButtonCommandParameter | Gets or sets the parameter to pass to the `FluentAvalonia.UI.Controls.TabView.AddTabButtonCommand` property |
AddTabButtonCommandParameterProperty | Defines the `FluentAvalonia.UI.Controls.TabView.AddTabButtonCommandParameter` property |
AddTabButtonCommandProperty | Defines the `FluentAvalonia.UI.Controls.TabView.AddTabButtonCommand` property |
AllowDropTabs | Gets or sets a value that determines whether the TabView can be a drop target for the purposes of drag-and-drop operations |
AllowDropTabsProperty | Defines the `FluentAvalonia.UI.Controls.TabView.AllowDropTabs` property |
CanDragTabs | Gets or sets a value that indicates whether tabs can be dragged as a data payload |
CanDragTabsProperty | Defines the `FluentAvalonia.UI.Controls.TabView.CanDragTabs` property |
CanReorderTabs | Gets or sets a value that indicates whether the tabs in the TabStrip can be reordered through user interaction |
CanReorderTabsProperty | Defines the `FluentAvalonia.UI.Controls.TabView.CanReorderTabs` property |
CloseButtonOverlayMode | Gets or sets a value that indicates the behavior of the close button within tabs |
CloseButtonOverlayModeProperty | Defines the `FluentAvalonia.UI.Controls.TabView.CloseButtonOverlayMode` property |
IsAddTabButtonVisible | Gets or sets whether the add (+) tab button is visible |
IsAddTabButtonVisibleProperty | Defines the `FluentAvalonia.UI.Controls.TabView.IsAddTabButtonVisible` property |
SelectedIndex | Gets or sets the index of the selected tab |
SelectedIndexProperty | Defines the `FluentAvalonia.UI.Controls.TabView.SelectedIndex` property |
SelectedItem | Gets or sets the selected tab item |
SelectedItemProperty | Defines the `FluentAvalonia.UI.Controls.TabView.SelectedItem` property |
TabItems | Gets or sets the TabItems this TabView displays |
TabItemsProperty | Defines the `FluentAvalonia.UI.Controls.TabView.TabItems` property |
TabItemTemplate | Gets or sets the IDataTemplate used to display each item |
TabItemTemplateProperty | Defines the `FluentAvalonia.UI.Controls.TabView.TabItemTemplate` property |
TabStripFooter | Gets or sets the content that is shown to the right of the tab strip |
TabStripFooterProperty | Defines the `FluentAvalonia.UI.Controls.TabView.TabStripFooter` property |
TabStripFooterTemplate | Gets or sets the IDataTemplate used to display the content of the TabStripFooter |
TabStripFooterTemplateProperty | Defines the `FluentAvalonia.UI.Controls.TabView.TabStripFooterTemplate` property |
TabStripHeader | Gets or sets the content that is shown to the left of the tab strip |
TabStripHeaderProperty | Definse the `FluentAvalonia.UI.Controls.TabView.TabStripHeader` property |
TabStripHeaderTemplate | Gets or sets the IDataTemplate used to dispaly the content of the TabStripHeader |
TabStripHeaderTemplateProperty | Define the `FluentAvalonia.UI.Controls.TabView.TabStripHeaderTemplate` property |
TabWidthMode | Gets or sets how the tabs should be sized |
TabWidthModeProperty | Defines the `FluentAvalonia.UI.Controls.TabView.TabWidthMode` property |
Header | Gets or sets the content that appears inside the tabstrip to represent the tab |
HeaderProperty | Defines the `FluentAvalonia.UI.Controls.TabViewItem.Header` property |
HeaderTemplate | Gets or sets the IDataTemplate used to display the `FluentAvalonia.UI.Controls.TabViewItem.Header` content |
HeaderTemplateProperty | Defines the `FluentAvalonia.UI.Controls.TabViewItem.HeaderTemplate` property |
IconSource | Gets or sets a value for the IconSource to be displayed within the tab |
IconSourceProperty | Defines the `FluentAvalonia.UI.Controls.TabViewItem.IconSource` property |
IsClosable | Gets or sets the value that determines if the tab shows a close button (default is true) |
IsClosableProperty | Defines the `FluentAvalonia.UI.Controls.TabViewItem.IsClosable` property |
TabViewTemplateSettings | Gets an object that provides calculated values that can be referenced as {TemplateBinding} markup extension sources when definign templates for a TabViewItem control |
TabViewTemplateSettingsProperty | Defines the `FluentAvalonia.UI.Controls.TabViewItem.TabViewTemplateSettings` property |
IconElement | Gets the IconElement that relates to the IconSource of the current TabViewItem |
IconElementProperty | Defines the `FluentAvalonia.UI.Controls.TabViewItemTemplateSettings.IconElement` property |
TabGeometry | Gets the geometry of the current TabViewItem |
TabGeometryProperty | Defines the `FluentAvalonia.UI.Controls.TabViewItemTemplateSettings.TabGeometry` property |
Events
AddTabButtonClick | Occurs when the add (+) tab button has been clicked |
SelectionChanged | Occurs when the currently selected tab changes |
TabCloseRequested | Raised when the user attempts to close a Tab via clicking the x-to-close button |
TabDragCompleted | Raised when the user completes the drag action |
TabDragStarting | Occurs when a drag operation is initiated |
TabDroppedOutside | Occurs when the user completes a drag and drop operation by dropping a tab outside of the tab strip area |
TabItemsChanged | Raised when the items collection has changed |
TabStripDragOver | Occurs when the input system reports an underlying drag event with the TabStrip as the potential drop target |
TabStripDrop | Occurs when the input system reports an underlying drop event with the TabStrip as the drop target |
CloseRequested | Raised when the user attempts to close the TabViewItem via clicking the x-to-close button |
Methods
Related Enums/Classes
TabViewWidthMode
Equal | Each tab has the same width |
SizeToContent | Each tab adjusts its width to the content within the tab |
Compact | Unselected tabs collapse to show only their icon. The selected tab adjusts to display the content within the tab |
TabViewCloseButtonOverlayMode
Auto | Behavior is defined by the framework. Default: this always maps to Always |
OnPointerOver | The selected tab always shows the close button if it is closable. Unselected tabs show the close button when the tab is closable and the user has their pointer over the tab |
Always | The selected tab always show the close button. Unselected tabs always show the close button if they are closable |
TabViewTabCloseRequestedEventArgs
Item | Gets a value that represents the data context for the tab in which a close is being requested |
Tab | Gets the tab in which a close is being requested |
TabViewTabDroppedOutsideEventArgs
Item | Gets the item that was dropped outside of the TabStrip |
Tab | Gets the TabViewItem that was dropped outside of the TabStrip |
TabViewTabDragStartingEventArgs
Cancel | Gets or sets a value that indicates whether the drag action should be cancelled |
Data | Gets the data payload associated with a drag action |
Item | Gets the item taht was selected for the drag action |
Tab | Gets the TabViewItem that was selected for the drag action |
TabViewTabDragCompletedEventArgs
DropResult | Gets a value that indicates what operation was performed on the dragged data, and whether it was successful |
Item | Gets the item that was selected for the drag action |
Tab | Gets the TabViewItem that was selected for the drag action |