Class SimpleTabControlView
Represents a simple tab control view.
public class SimpleTabControlView : BaseContentView, INotifyPropertyChanged, IEffectControlProvider, IToolTipElement, IContextFlyoutElement, IAnimatable, IViewController, IVisualElementController, IElementController, IGestureController, IGestureRecognizers, IPropertyMapperView, IHotReloadableView, IReplaceableView, ILayout, ILayoutController, IVisualTreeElement, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout, IRaiseSystemColorsChanged
- Inheritance
-
SimpleTabControlView
- Implements
Constructors
- SimpleTabControlView()
Initializes a new instance of the SimpleTabControlView class.
Fields
- DefaultTabIsBoldWhenSelected
Indicates whether the tab is displayed in bold when selected.
- DefaultTabStyle
Gets or sets the default style applied to the tabs.
Properties
- AltHeaderBackColor
Gets or sets the alternative header background color.
- Content
Gets or sets the content of the tab control view. You can use this property to set the active tab contents. Normally, it is updated automatically when a new tab is selected with the control that was specified when the tab was added.
- ContentGrid
Gets the content grid of the tab control view.
- EmptyPanel
Gets or sets the empty panel displayed when no tab is selected.
- Header
Gets the header of the tab control view.
- IsContentVisible
Gets or sets a value indicating whether the content area is visible.
- MakeFirstOnlyIfNotVisible
Gets or sets a value indicating whether to move the selected tab to the first position only if it is not currently visible. This property is used in conjunction with MakeSelectedTabFirst property. Default is true.
- MakeSelectedTabFirst
Gets or sets a value indicating whether the selected tab should be made the first tab. This property is used in SelectTab(TabControlItem?) method. This property can be useful on mobile devices with limited screen space to ensure that the selected tab is always visible.
- PreviousSelectedIndex
Gets the index of the previously selected tab.
- SelectedIndex
Gets or sets the index of the selected tab.
- SelectedTab
Gets or sets the selected tab control item.
- TabCount
Gets the number of tabs in the tab control view.
- Tabs
Gets the collection of tabs in the tab control view.
Methods
- Add(string?, Func<View>?, string?, SvgImage?)
Adds a new tab to the tab control view.
- GetContentHeight()
Gets the height of the content area, or 0 if the content is not present or not visible.
- GetHeaderHeight()
Gets the height of the header area, based on the visibility and content of the tabs.
- GetTab(int)
Gets the tab at the specified index.
- GetTabButton(int)
Gets the tab button at the specified index.
- GetTotalHeight()
Calculates the total height by summing the header and content heights.
- RemoveTab(TabControlItem?)
Removes the specified tab control item.
- SelectFirstTab()
Selects the first tab.
- SelectTab(TabControlItem?)
Selects the specified tab control item.
- SelectTab(int)
Selects the tab at the specified index.
- SetContentVisibility(bool, double)
Sets the visibility of the content and updates the minimum height based on the suggested value.
- SetMinimumHeightFromContent(double)
Sets the minimum height of the control based on the visibility of its content and a suggested height value.
- SetTabFont(string?, double)
Sets the font for the tabs.
- ToggleContentVisibility(double)
Toggles the visibility state of the content and updates the minimum height based on the specified suggested height.
Events
- SelectedTabChanged
Occurs when the selected tab changes.
- SelectedTabClickedAgain
Occurs when the currently selected tab is clicked again by the user.