Class SfTabControl
Represents a control that contains multiple items that share the same space for content on the screen.
Implements
Inherited Members
Namespace: Syncfusion.UI.Xaml.Controls.Navigation
Assembly: Syncfusion.SfTabControl.UWP.dll
Syntax
[ClassReference(IsReviewed = false)]
public class SfTabControl : Selector, IDisposable
Remarks
TabControl is a Selector which means it can contain a collection of objects of any type (such as string, image, or panel) and it is selectable.
Constructors
SfTabControl()
Initializes a new instance of the SfTabControl class.
Declaration
[ClassReference(IsReviewed = false)]
public SfTabControl()
See Also
Fields
CloseButtonTypeProperty
Represents the CloseButtonTypeProperty
Declaration
public static readonly DependencyProperty CloseButtonTypeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ContentTemplateProperty
Using a DependencyProperty as the backing store for ContentTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ContentTemplateProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ContentTemplateSelectorProperty
Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ContentTemplateSelectorProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ContentTransitionsProperty
Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ContentTransitionsProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
DisableTabItemContentUnloadProperty
Using a DependencyProperty as the backing store for DisableTabItemContentUnload. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty DisableTabItemContentUnloadProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
EnableSwipeGesturesProperty
Using a DependencyProperty as the backing store for Enable Swipe Gestures. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty EnableSwipeGesturesProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HeaderFontSizeProperty
Using a DependencyProperty as the backing store for HeaderFontSize. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderFontSizeProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HeaderTemplateProperty
Using a DependencyProperty as the backing store for HeaderTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderTemplateProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HeaderTemplateSelectorProperty
Using a DependencyProperty as the backing store for HeaderTemplateSelector. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HeaderTemplateSelectorProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
HighlightOnSelectionProperty
Using a DependencyProperty as the backing store for HighlightOnSelection. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty HighlightOnSelectionProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
LeftHeaderProperty
Using a DependencyProperty as the backing store for LeftHeader. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty LeftHeaderProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
PinnedTabScrollButtonVisibilityProperty
Represents the PinnedTabScrollButtonVisibilityProperty
Declaration
public static readonly DependencyProperty PinnedTabScrollButtonVisibilityProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
RightHeaderProperty
Using a DependencyProperty as the backing store for RightHeader. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty RightHeaderProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SelectedContentProperty
Using a DependencyProperty as the backing store for SelectedContent. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedContentProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SelectedContentTemplateProperty
Using a DependencyProperty as the backing store for SelectedContentTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectedContentTemplateProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
SelectionStyleProperty
Using a DependencyProperty as the backing store for SelectionStyle. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty SelectionStyleProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ShowContextMenuProperty
Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ShowContextMenuProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ShowCustomContextMenuProperty
Using a DependencyProperty as the backing store for MyProperty. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ShowCustomContextMenuProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ShowIconProperty
Using a DependencyProperty as the backing store for ShowIcon. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ShowIconProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
ShowTabstripMenuProperty
Using a DependencyProperty as the backing store for Show Tab strip Menu. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty ShowTabstripMenuProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TabControlHorizontalTemplateProperty
Using a DependencyProperty as the backing store for TabControlHorizontalTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TabControlHorizontalTemplateProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TabControlVerticalTemplateProperty
Using a DependencyProperty as the backing store for TabControlVerticalTemplate. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TabControlVerticalTemplateProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TabScrollButtonVisibilityProperty
Represents the TabScrollButtonVisibilityProperty
Declaration
public static readonly DependencyProperty TabScrollButtonVisibilityProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TabstripMenuItemsProperty
Using a DependencyProperty as the backing store for Tab Strip Menu Items. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TabstripMenuItemsProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TabstripMenuItemTemplateProperty
Using a DependencyProperty as the backing store for Tab strip Menu Item Template. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TabstripMenuItemTemplateProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
TabStripPlacementProperty
Using a DependencyProperty as the backing store for TabStripPlacement. This enables animation, styling, binding, etc...
Declaration
public static readonly DependencyProperty TabStripPlacementProperty
Field Value
Type |
---|
Windows.UI.Xaml.DependencyProperty |
Properties
CloseButtonType
Gets or sets a value of the CloseButtonType dependency property.
Declaration
public CloseButtonType CloseButtonType { get; set; }
Property Value
Type |
---|
CloseButtonType |
ContentTemplate
Gets or sets a value of the data used to display the content of the selected SfTabItem.
Declaration
[ClassReference(IsReviewed = false)]
public DataTemplate ContentTemplate { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.DataTemplate | The Default value is null. |
See Also
ContentTemplateSelector
Gets or sets a value of the Template Selector for the data used to display the content of the selected SfTabItem.
Declaration
[ClassReference(IsReviewed = false)]
public DataTemplateSelector ContentTemplateSelector { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Controls.DataTemplateSelector | The Default value is null. |
See Also
ContentTransitions
Gets or sets a value of the collection of transitions that apply to the content area of SfTabControl.
Declaration
[ClassReference(IsReviewed = false)]
public TransitionCollection ContentTransitions { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Media.Animation.TransitionCollection | Windows.UI.Xaml.Media.Animation.. |
See Also
DisableTabItemContentUnload
Gets or sets a value indicating whether single or individual ContentPresenters to be used to show selected item content.
Declaration
[ClassReference(IsReviewed = false)]
public bool DisableTabItemContentUnload { get; set; }
Property Value
Type |
---|
System.Boolean |
EnableSwipeGestures
Gets or sets a value indicating whether the Enable Gesture
Declaration
public bool EnableSwipeGestures { get; set; }
Property Value
Type |
---|
System.Boolean |
HeaderFontSize
Gets or sets a value of FontSize to be set common for all tab item
Declaration
[ClassReference(IsReviewed = false)]
public double HeaderFontSize { get; set; }
Property Value
Type |
---|
System.Double |
HeaderTemplate
Gets or sets a value of the template for the data used as header for SfTabControl.
Declaration
[ClassReference(IsReviewed = false)]
public DataTemplate HeaderTemplate { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.DataTemplate | The default is null. |
See Also
HeaderTemplateSelector
Gets or sets a value of Template Selector for the data used as header for SfTabControl.
Declaration
public DataTemplateSelector HeaderTemplateSelector { get; set; }
Property Value
Type | Description |
---|---|
Windows.UI.Xaml.Controls.DataTemplateSelector | The default is null. |
See Also
HighlightOnSelection
Gets or sets a value indicating whether the HighlightOnSelection is used to High light the tab item Default value is false
Declaration
public bool HighlightOnSelection { get; set; }
Property Value
Type |
---|
System.Boolean |
LeftHeader
Gets or sets a value of header at left side of control
Declaration
[ClassReference(IsReviewed = false)]
public object LeftHeader { get; set; }
Property Value
Type |
---|
System.Object |
PinnedTabScrollButtonVisibility
Gets or sets a value of the PinnedTabScrollButtonVisibility dependency property.
Declaration
public TabScrollButtonVisibility PinnedTabScrollButtonVisibility { get; set; }
Property Value
Type |
---|
TabScrollButtonVisibility |
RightHeader
Gets or sets a value of the content for header at right side of control
Declaration
[ClassReference(IsReviewed = false)]
public object RightHeader { get; set; }
Property Value
Type |
---|
System.Object |
SelectionStyle
Gets or sets the value for the SelectionStyle
Declaration
public SelectionStyle SelectionStyle { get; set; }
Property Value
Type |
---|
SelectionStyle |
ShowContextMenu
Gets or sets a value indicating whether the ContextMenu to be shown or not
Declaration
public bool ShowContextMenu { get; set; }
Property Value
Type |
---|
System.Boolean |
ShowCustomContextMenu
Gets or sets a value indicating whether the custom context menu is showable or not
Declaration
[ClassReference(IsReviewed = false)]
public bool ShowCustomContextMenu { get; set; }
Property Value
Type |
---|
System.Boolean |
ShowIcon
Gets or sets a value indicating whether the Icon to be visible or not in in tab item default value is false
Declaration
[ClassReference(IsReviewed = false)]
public bool ShowIcon { get; set; }
Property Value
Type |
---|
System.Boolean |
ShowTabstripMenu
Gets or sets a value indicating whether the TabStripMenu with Tab Item headers for switching tab items on selection can be displayed or not.
Declaration
public bool ShowTabstripMenu { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
TabControlHorizontalTemplate
Gets or sets a value of the tab control horizontal template
Declaration
public ControlTemplate TabControlHorizontalTemplate { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Controls.ControlTemplate |
TabControlVerticalTemplate
Gets or sets a value of the tab control Vertical template
Declaration
public ControlTemplate TabControlVerticalTemplate { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.Controls.ControlTemplate |
TabScrollButtonVisibility
Gets or sets a value of the TabScrollButtonVisibility dependency property.
Declaration
public TabScrollButtonVisibility TabScrollButtonVisibility { get; set; }
Property Value
Type |
---|
TabScrollButtonVisibility |
TabstripMenuItems
Gets or sets a value of the Menu items for Tab strip Menu
Declaration
public List<object> TabstripMenuItems { get; set; }
Property Value
Type |
---|
System.Collections.Generic.List<System.Object> |
TabstripMenuItemTemplate
Gets or sets the value to set the template for the Tab strip Menu Items
Declaration
public DataTemplate TabstripMenuItemTemplate { get; set; }
Property Value
Type |
---|
Windows.UI.Xaml.DataTemplate |
TabStripPlacement
Gets or sets a value of the placement option to place the SfTabControl.
Declaration
[ClassReference(IsReviewed = false)]
public TabStripPlacement TabStripPlacement { get; set; }
Property Value
Type | Description |
---|---|
TabStripPlacement | Default value is Top. |
Remarks
Tab strip can be placed around the control using TabStripPlacement property. It has the following options. Default option is Top.
Methods
add_NextTab(SfTabControl.TabScrollEventHandler)
Declaration
public void add_NextTab(SfTabControl.TabScrollEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfTabControl.TabScrollEventHandler | value |
add_PreviousTab(SfTabControl.TabScrollEventHandler)
Declaration
public void add_PreviousTab(SfTabControl.TabScrollEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfTabControl.TabScrollEventHandler | value |
add_TabClosed(SfTabControl.TabClosedEventHandler)
Declaration
public void add_TabClosed(SfTabControl.TabClosedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfTabControl.TabClosedEventHandler | value |
add_TabClosing(SfTabControl.CancelingEventHandler)
Declaration
public void add_TabClosing(SfTabControl.CancelingEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfTabControl.CancelingEventHandler | value |
Dispose()
Disposes the control while unloading.
Declaration
public void Dispose()
Dispose(Boolean)
Disposing unused objects
Declaration
protected virtual void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Argument to dispose the unused object |
GetContainerForItemOverride()
Checks if the item is a SfTabItem
Declaration
protected override DependencyObject GetContainerForItemOverride()
Returns
Type | Description |
---|---|
Windows.UI.Xaml.DependencyObject | Dependency Object |
IsItemItsOwnContainerOverride(Object)
Checks if the item is a SfTabItem
Declaration
protected override bool IsItemItsOwnContainerOverride(object item)
Parameters
Type | Name | Description |
---|---|---|
System.Object | item | corresponding tab item |
Returns
Type | Description |
---|---|
System.Boolean |
|
OnApplyTemplate()
Initializes all the child elements of the SfTabControl TabControl control.
Declaration
protected override void OnApplyTemplate()
Overrides
OnItemsChanged(Object)
Called whenever item is added or removed
Declaration
protected override void OnItemsChanged(object e)
Parameters
Type | Name | Description |
---|---|---|
System.Object | e | the event arguments |
OnPointerCaptureLost(PointerRoutedEventArgs)
Invoked when the pointer is capture lost on the control
Declaration
protected override void OnPointerCaptureLost(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | e | The event arguments |
OnPointerMoved(PointerRoutedEventArgs)
Invoked when the pointer is moved on the control
Declaration
protected override void OnPointerMoved(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | e | The event arguments |
OnPointerPressed(PointerRoutedEventArgs)
Invoked when the pointer is pressed on the control
Declaration
protected override void OnPointerPressed(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | e | The event arguments |
OnPointerReleased(PointerRoutedEventArgs)
Invoked when the pointer is released on the control
Declaration
protected override void OnPointerReleased(PointerRoutedEventArgs e)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.Input.PointerRoutedEventArgs | e | The event arguments |
OnSelectionChanged(DependencyPropertyChangedEventArgs)
Occurs when the selected Tab item SfTabItem is changed.
Declaration
protected override void OnSelectionChanged(DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyPropertyChangedEventArgs | args | the event arguments |
Overrides
OnTabStripPlacementChanged(DependencyPropertyChangedEventArgs)
Invoked when the TabStripPlacement TabStripPlacement is changed.
Declaration
protected virtual void OnTabStripPlacementChanged(DependencyPropertyChangedEventArgs args)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyPropertyChangedEventArgs | args | the event arguments |
PrepareContainerForItemOverride(DependencyObject, Object)
Arranges the container for overridden items
Declaration
protected override void PrepareContainerForItemOverride(DependencyObject element, object item)
Parameters
Type | Name | Description |
---|---|---|
Windows.UI.Xaml.DependencyObject | element | The Tab Item |
System.Object | item | Items to be overridden |
remove_NextTab(SfTabControl.TabScrollEventHandler)
Declaration
public void remove_NextTab(SfTabControl.TabScrollEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfTabControl.TabScrollEventHandler | value |
remove_PreviousTab(SfTabControl.TabScrollEventHandler)
Declaration
public void remove_PreviousTab(SfTabControl.TabScrollEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfTabControl.TabScrollEventHandler | value |
remove_TabClosed(SfTabControl.TabClosedEventHandler)
Declaration
public void remove_TabClosed(SfTabControl.TabClosedEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfTabControl.TabClosedEventHandler | value |
remove_TabClosing(SfTabControl.CancelingEventHandler)
Declaration
public void remove_TabClosing(SfTabControl.CancelingEventHandler value)
Parameters
Type | Name | Description |
---|---|---|
SfTabControl.CancelingEventHandler | value |
Events
NextTab
This event will be raised after the tab item is navigated to Right/Bottom.
Declaration
public event SfTabControl.TabScrollEventHandler NextTab
Event Type
Type |
---|
SfTabControl.TabScrollEventHandler |
PreviousTab
This event will be raised after the tab item is navigated to Left/Top.
Declaration
public event SfTabControl.TabScrollEventHandler PreviousTab
Event Type
Type |
---|
SfTabControl.TabScrollEventHandler |
TabClosed
This event will be raised after the tab item is closed in TabControl.
Declaration
public event SfTabControl.TabClosedEventHandler TabClosed
Event Type
Type |
---|
SfTabControl.TabClosedEventHandler |
TabClosing
This cancellable event will be raised before the tab item is closed in TabControl.
Declaration
public event SfTabControl.CancelingEventHandler TabClosing
Event Type
Type |
---|
SfTabControl.CancelingEventHandler |