Class TabPanel
Handles the layout of TabItem objects on a TabControl.
Inherited Members
Namespace: System.Windows.Controls.Primitives
Assembly: OpenSilver.Controls.dll
Syntax
public class TabPanel : Panel, IFrameworkElement, IUIElement, IDependencyObject
Remarks
TabPanel is a Panel designed to handle the intricacies of laying out the tab buttons in a TabControl. Specifically, it handles: Serving as an ItemsHost for TabItems within a TabControl Determining correct sizing and positioning for TabItems Handling the logic associated with MultiRow scenarios, namely: Calculating row breaks in a collection of TabItems Laying out TabItems in multiple rows based on those breaks Performing specific layout for a selected item to indicate selection, namely: Bringing the selected tab to the front, or, in other words, making the selected tab appear to be in front of other tabs. Increasing the size pre-layout size of a selected item (note that this is not a transform, but rather an increase in the size allotted to the element in which to perform layout). Bringing the selected tab to the front Exposing attached properties that allow TabItems to be styled based on their placement within the TabPanel.
Constructors
| Improve this Doc View SourceTabPanel()
Initializes a new instance of the TabPanel class.
Declaration
public TabPanel()
Properties
| Improve this Doc View SourceLogicalChildren
Gets an enumerator that can iterate the logical child elements of this Panel element.
Declaration
protected sealed override IEnumerator LogicalChildren { get; }
Property Value
Type | Description |
---|---|
System.Collections.IEnumerator | An System.Collections.IEnumerator. This property has no default value. |
Overrides
Methods
| Improve this Doc View SourceArrangeOverride(Size)
Arranges and sizes the content of a TabPanel object.
Declaration
protected override Size ArrangeOverride(Size finalSize)
Parameters
Type | Name | Description |
---|---|---|
Size | finalSize | The size that a tab panel uses to position child elements. |
Returns
Type | Description |
---|---|
Size | The size of the arranged control. |
Overrides
| Improve this Doc View SourceCreateUIElementCollection(FrameworkElement)
Creates a new UIElementCollection.
Declaration
protected sealed override UIElementCollection CreateUIElementCollection(FrameworkElement logicalParent)
Parameters
Type | Name | Description |
---|---|---|
FrameworkElement | logicalParent | The logical parent element of the collection to be created. |
Returns
Type | Description |
---|---|
UIElementCollection | An ordered collection of elements that have the specified logical parent. |
Overrides
| Improve this Doc View SourceMeasureOverride(Size)
Called when re-measuring the control is required.
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
Type | Name | Description |
---|---|---|
Size | availableSize | Constraint size as an upper limit. The return value should not exceed this size. |
Returns
Type | Description |
---|---|
Size | The measured size of the control. |