Class SfTabView
SfTabView control lets users explore and switch among different views.
Inheritance
Implements
Namespace: Syncfusion.XForms.TabView
Assembly: Syncfusion.SfTabView.XForms.dll
Syntax
public class SfTabView : View, IParentThemeElement, IThemeElement, IDisposable
Constructors
SfTabView()
Initializes a new instance of the SfTabView class.
Declaration
public SfTabView()
Fields
CenterButtonSettingsProperty
Identifies the CenterButtonSettings bindable property. This property can be used to change the CenterButtonSettings of SfTabView.
Declaration
public static readonly BindableProperty CenterButtonSettingsProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
CenterButtonViewProperty
Identifies the CenterButtonView bindable property. This property can be used to change customize the center button view in SfTabView.
Declaration
public static readonly BindableProperty CenterButtonViewProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ContentTransitionDurationProperty
Identifies the ContentTransitionDuration bindable property Using a DependencyProperty as the backing store for ContentTransitionDuration. This enables animation, styling, binding, etc...
Declaration
public static readonly BindableProperty ContentTransitionDurationProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
DisplayModeProperty
Identifies the DisplayMode bindable property. This property can be used to change the displymode in a tab header.
Declaration
public static readonly BindableProperty DisplayModeProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
EnableRippleAnimationProperty
Identifies the EnableRippleAnimation bindable property. It indicates whether the animation is enabled or not when tab is selected in SfTabView.
Declaration
public static readonly BindableProperty EnableRippleAnimationProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
EnableSwipingProperty
Identifies the EnableSwiping bindable property. It indicates whether the swiping is enable or not in SfTabView.
Declaration
public static readonly BindableProperty EnableSwipingProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
EnableVirtualizationProperty
Identifies the EnableVirtualization dependency property.
Declaration
public static readonly BindableProperty EnableVirtualizationProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Remarks
true if the tab item loaded asynchronous ; otherwise, false.The default value is false.
IsScrollButtonEnabledProperty
Identifies the IsScrollButtonEnabled bindable property. This property can be used to change the header position in a tab header.
Declaration
public static readonly BindableProperty IsScrollButtonEnabledProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ItemsProperty
Identifies the Items bindable property. This property can be used to give the children for tab control through the collection of SfTabItem.
Declaration
public static readonly BindableProperty ItemsProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
OverflowButtonSettingsProperty
Identifies the OverflowButtonSettings bindable property. This property can be used to change the OverflowButtonSettings of SfTabView.
Declaration
public static readonly BindableProperty OverflowButtonSettingsProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
OverflowModeProperty
Identifies the OverflowMode bindable property. This property can be used to change the OverflowMode of SfTabView.
Declaration
public static readonly BindableProperty OverflowModeProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ScrollButtonBackgroundColorProperty
Identifies the ScrollButtonBackgroundColor bindable property. This property can be used to change the ScrollableButtonFontColor.
Declaration
public static readonly BindableProperty ScrollButtonBackgroundColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
ScrollButtonForegroundColorProperty
Identifies the ScrollButtonForegroundColor bindable property. This property can be used to change the ScrollableButtonFontColor.
Declaration
public static readonly BindableProperty ScrollButtonForegroundColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
SelectedIndexProperty
Identifies the SelectedIndex bindable property. This property can be used to change selected index of SfTabView.
Declaration
public static readonly BindableProperty SelectedIndexProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
SelectionIndicatorSettingsProperty
Identifies the SelectionIndicatorSettings bindable property. This property can be used to change the SelectionIndicatorSettings in SfTabView.
Declaration
public static readonly BindableProperty SelectionIndicatorSettingsProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
SwipingThresholdProperty
Identifies the TabHeight bindable property. This property can be used to change the value of swiping threshold.
Declaration
public static readonly BindableProperty SwipingThresholdProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TabHeaderBackgroundColorProperty
Identifies the TabHeaderBackgroundColor bindable property. This property can be used to change the tab header background of SfTabView.
Declaration
public static readonly BindableProperty TabHeaderBackgroundColorProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TabHeaderDirectionProperty
Identifies the TabHeaderDirection bindable property. This property can be used to change the direction of the header.
Declaration
public static readonly BindableProperty TabHeaderDirectionProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TabHeaderPositionProperty
Identifies the TabHeaderPosition bindable property. This property can be used to change the header position in a tab header.
Declaration
public static readonly BindableProperty TabHeaderPositionProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TabHeightProperty
Identifies the TabHeight bindable property. This property can be used to change customize the height in SfTabView.
Declaration
public static readonly BindableProperty TabHeightProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
TabWidthModeProperty
Identifies the TabWidthMode dependency property.
Declaration
public static readonly BindableProperty TabWidthModeProperty
Field Value
Type | Description |
---|---|
Xamarin.Forms.BindableProperty | true if auto tab width is enabled; otherwise, false.The default value is false. |
TabWidthProperty
Identifies the TabWidth bindable property. This property can be used to change customize the width in SfTabView.
Declaration
public static readonly BindableProperty TabWidthProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
VisibleHeaderCountProperty
Identifies the VisibleHeaderCount bindable property. It determines the number of items to be placed in a tab header.
Declaration
public static readonly BindableProperty VisibleHeaderCountProperty
Field Value
Type |
---|
Xamarin.Forms.BindableProperty |
Properties
CenterButtonSettings
Gets or sets the center button settings. This property can be used to change the CenterButtonSettings of SfTabView.
Declaration
public CenterButtonSettings CenterButtonSettings { get; set; }
Property Value
Type | Description |
---|---|
CenterButtonSettings | The center button settings. |
CenterButtonView
Gets or sets the value of CenterButtonView. This property can be used to change customize the center button view in SfTabView.
Declaration
public View CenterButtonView { get; set; }
Property Value
Type |
---|
Xamarin.Forms.View |
ContentTransitionDuration
Gets or sets a value indicating the SfTabView content transition duration .
Declaration
public int ContentTransitionDuration { get; set; }
Property Value
Type |
---|
System.Int32 |
DisplayMode
Gets or sets the value to define the type of header. By default it will display title from SfTabItem.
Declaration
public TabDisplayMode DisplayMode { get; set; }
Property Value
Type |
---|
TabDisplayMode |
EnableRippleAnimation
Gets or sets a value indicating whether the animation is enabled or not when tab is selected in SfTabView.
Declaration
public bool EnableRippleAnimation { get; set; }
Property Value
Type |
---|
System.Boolean |
EnableSwiping
Gets or sets a value indicating whether SfTabView should enable swiping or not.
Declaration
public bool EnableSwiping { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
|
EnableVirtualization
Gets or sets a value that indicates whether to load the tab items asynchronous or not.
Declaration
public bool EnableVirtualization { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean | true if the tab item load asynchronous; otherwise, false.The default value is false. |
Remarks
EnableVirtualization load asynchronous item initially, so this API not work dynamically
IsScrollButtonEnabled
Gets or sets a value indicating whether gets or sets the value of the IsScrollButtonEnabled. This property can be used to Enable the Scroll Buttons.
Declaration
public bool IsScrollButtonEnabled { get; set; }
Property Value
Type |
---|
System.Boolean |
Items
Gets or sets the value of the Items. This property can be used to give children for tab control through the collection of SfTabItem.
Declaration
public TabItemCollection Items { get; set; }
Property Value
Type |
---|
TabItemCollection |
OverflowButtonSettings
Gets or sets the value of the OverflowButtonSettings. This property can be used to change the OverflowButtonSettings of SfTabView.
Declaration
public OverflowButtonSettings OverflowButtonSettings { get; set; }
Property Value
Type |
---|
OverflowButtonSettings |
OverflowMode
Gets or sets the value to choose navigation option for the exceeded headers which can't be occupied in the current view.
Declaration
public OverflowMode OverflowMode { get; set; }
Property Value
Type |
---|
OverflowMode |
ScrollButtonBackgroundColor
Gets or sets the value of the ScrollBackgroundColor. This property can be used to set the ScrollableBackgroundColor.
Declaration
public Color ScrollButtonBackgroundColor { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Color |
ScrollButtonForegroundColor
Gets or sets the value of the scroll button font color. This property can be used to set the ScrollableButtons.
Declaration
public Color ScrollButtonForegroundColor { get; set; }
Property Value
Type |
---|
Xamarin.Forms.Color |
SelectedIndex
Gets or sets the value for SelectedIndex. This property can be used to change selected index of sfTabView.
Declaration
public int SelectedIndex { get; set; }
Property Value
Type |
---|
System.Int32 |
SelectionIndicatorSettings
Gets or sets value to configure the attributes of SelectionIndicatorSettings, Selection indicator is a strip which is used to indicate the selected index of SfTabView.
Declaration
public SelectionIndicatorSettings SelectionIndicatorSettings { get; set; }
Property Value
Type |
---|
SelectionIndicatorSettings |
SwipingThreshold
Gets or sets the value of the SwipingThreshold. This property can be used to change value of swiping threshold.
Declaration
public double SwipingThreshold { get; set; }
Property Value
Type |
---|
System.Double |
TabHeaderBackgroundColor
Gets or sets the value of the TabHeaderBackgroundColor. This property can be used to change the tab header background of SfTabView.
Declaration
public Color TabHeaderBackgroundColor { get; set; }
Property Value
Type | Description |
---|---|
Xamarin.Forms.Color | The color of the tab header background. |
TabHeaderDirection
Gets or sets the value of the tab header direction. This property can be used to change the header direction in SfTabView.
Declaration
public TabHeaderDirection TabHeaderDirection { get; set; }
Property Value
Type |
---|
TabHeaderDirection |
TabHeaderPosition
Gets or sets the value of the TabHeaderPosition. This property can be used to change the header position in a tab header.
Declaration
public TabHeaderPosition TabHeaderPosition { get; set; }
Property Value
Type |
---|
TabHeaderPosition |
TabHeight
Gets or sets the value of the TabHeight. This property can be used to change customize the height in SfTabView.
Declaration
public double TabHeight { get; set; }
Property Value
Type |
---|
System.Double |
TabWidth
Gets or sets the value of the TabWidth. This property can be used to change customize the width in SfTabView.
Declaration
public double TabWidth { get; set; }
Property Value
Type |
---|
System.Double |
TabWidthMode
Gets or sets a value that indicates whether the auto tab width is enabled.
Declaration
public TabWidthMode TabWidthMode { get; set; }
Property Value
Type | Description |
---|---|
TabWidthMode | true if auto tab width is enabled; otherwise, false.The default value is false. |
VisibleHeaderCount
Gets or sets the value for the number of headers to be displayed in the visible region.
Declaration
public Nullable<int> VisibleHeaderCount { get; set; }
Property Value
Type |
---|
System.Nullable<System.Int32> |
Methods
Dispose()
The dispose method.
Declaration
public void Dispose()
OnMeasure(Double, Double)
Ons the measure.
Declaration
protected override SizeRequest OnMeasure(double widthConstraint, double heightConstraint)
Parameters
Type | Name | Description |
---|---|---|
System.Double | widthConstraint | Width constraint. |
System.Double | heightConstraint | Height constraint. |
Returns
Type | Description |
---|---|
Xamarin.Forms.SizeRequest | The measure. |
Events
CenterButtonTapped
It occurs when overflow center tapped in SfTabView
Declaration
public event EventHandler<EventArgs> CenterButtonTapped
Event Type
Type |
---|
System.EventHandler<System.EventArgs> |
OverflowButtonTapped
It occurs when overflow button tapped in SfTabView
Declaration
public event EventHandler<CancelEventArgs> OverflowButtonTapped
Event Type
Type |
---|
System.EventHandler<CancelEventArgs> |
SelectionChanged
It occurs when selection has changed in SfTabView
Declaration
public event EventHandler<SelectionChangedEventArgs> SelectionChanged
Event Type
Type |
---|
System.EventHandler<SelectionChangedEventArgs> |
SelectionChanging
It occurs when selection has been changing in SfTabView
Declaration
public event EventHandler<SelectionChangingEventArgs> SelectionChanging
Event Type
Type |
---|
System.EventHandler<SelectionChangingEventArgs> |
TabItemTapped
This event occurs when tab header item tapped in SfTabView
Declaration
public event EventHandler<TabItemTappedEventArgs> TabItemTapped
Event Type
Type |
---|
System.EventHandler<TabItemTappedEventArgs> |