Class SfSegmentedControl
SegmentedControl View lets users explore and switch among different views.
Inheritance
Implements
Namespace: Syncfusion.iOS.Buttons
Assembly: Syncfusion.Buttons.iOS.dll
Syntax
public class SfSegmentedControl : UIView, INotifyPropertyChanged, IComponent, IDisposable
Constructors
SfSegmentedControl()
Initializes a new instance of the SfSegmentedControl class.
Declaration
public SfSegmentedControl()
SfSegmentedControl(IntPtr)
Initializes a new instance of the SfSegmentedControl class.
Declaration
public SfSegmentedControl(IntPtr handle)
Parameters
| Type | Name | Description |
|---|---|---|
| System.IntPtr | handle | handle the control. |
Properties
AutoScrollSelectedItem
Gets or sets a value indicating whether to enable the auto scrolling when selected index is changed in SfSegmentedControl.
Declaration
public bool AutoScrollSelectedItem { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
BorderColor
Gets or sets the color of the border for SfSegmentedControl.
Declaration
public UIColor BorderColor { get; set; }
Property Value
| Type |
|---|
| UIKit.UIColor |
BorderThickness
Gets or sets the thickness of the border for SfSegmentedControl.
Declaration
public double BorderThickness { get; set; }
Property Value
| Type |
|---|
| System.Double |
Color
Gets or sets the text color of disabled segment items in SfSegmentedControl.
Declaration
public UIColor Color { get; set; }
Property Value
| Type |
|---|
| UIKit.UIColor |
CornerRadius
Gets or sets the corner radius value for the border of SfSegmentedControl.
Declaration
public double CornerRadius { get; set; }
Property Value
| Type |
|---|
| System.Double |
DisabledTextColor
Gets or sets the text color of disabled segment items in SfSegmentedControl.
Declaration
public UIColor DisabledTextColor { get; set; }
Property Value
| Type |
|---|
| UIKit.UIColor |
DisplayMode
Gets or sets the value to define the DisplayMode of segment. By default, it will display title from SfSegmentItem or the string value.
Declaration
public SegmentDisplayMode DisplayMode { get; set; }
Property Value
| Type |
|---|
| SegmentDisplayMode |
Font
Gets or sets the value for the font representation of text for a segment item.
Declaration
public UIFont Font { get; set; }
Property Value
| Type |
|---|
| UIKit.UIFont |
FontColor
Gets or sets the value for the color of text for a segment item.
Declaration
public UIColor FontColor { get; set; }
Property Value
| Type |
|---|
| UIKit.UIColor |
FontIconFont
Gets or sets the value for the font family of icon font text for a segment item.
Declaration
public UIFont FontIconFont { get; set; }
Property Value
| Type |
|---|
| UIKit.UIFont |
FontIconFontColor
Gets or sets the value for the color of font icon text for a segment item.
Declaration
public UIColor FontIconFontColor { get; set; }
Property Value
| Type |
|---|
| UIKit.UIColor |
ItemsSource
Gets or sets children for SfSegmentedControl through the collection of SfSegmentItem or collection of strings or views.
Declaration
public IEnumerable ItemsSource { get; set; }
Property Value
| Type |
|---|
| System.Collections.IEnumerable |
ScrollToPosition
Gets or sets a value for positioning the selected index at a specific position when AutoScrollSelectedItem is set to true.
Declaration
public ScrollToPosition ScrollToPosition { get; set; }
Property Value
| Type |
|---|
| ScrollToPosition |
SegmentBackgroundColor
Gets or sets the background color of the segment in SfSegmentedControl.
Declaration
public UIColor SegmentBackgroundColor { get; set; }
Property Value
| Type |
|---|
| UIKit.UIColor |
SegmentBorderColor
Gets or sets Segment background color
Declaration
public UIColor SegmentBorderColor { get; set; }
Property Value
| Type |
|---|
| UIKit.UIColor |
SegmentBorderThickness
Gets or sets Segment border thickness
Declaration
public double SegmentBorderThickness { get; set; }
Property Value
| Type |
|---|
| System.Double |
SegmentCornerRadius
Gets or sets the corner radius value for the segment items available in SfSegmentedControl.
Declaration
public double SegmentCornerRadius { get; set; }
Property Value
| Type |
|---|
| System.Double |
SegmentHeight
Gets or sets the value for the height of the segment in SfSegmentedControl.
Declaration
public double SegmentHeight { get; set; }
Property Value
| Type |
|---|
| System.Double |
SegmentPadding
Gets or sets Segment border thickness
Declaration
public double SegmentPadding { get; set; }
Property Value
| Type |
|---|
| System.Double |
SegmentWidth
Gets or sets the value for the width of the segment in SfSegmentedControl.
Declaration
public double SegmentWidth { get; set; }
Property Value
| Type |
|---|
| System.Double |
SelectedIndex
Gets or sets the value for current index of SfSegmentedControl.
Declaration
public int SelectedIndex { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
SelectionAnimationDuration
Gets or sets the value for the selection animation duration.
Declaration
public double SelectionAnimationDuration { get; set; }
Property Value
| Type |
|---|
| System.Double |
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 SfSegmentedControl
Declaration
public SelectionIndicatorSettings SelectionIndicatorSettings { get; set; }
Property Value
| Type |
|---|
| SelectionIndicatorSettings |
SelectionTextColor
Gets or sets the text color of the selected segment in SfSegmentedControl.
Declaration
public UIColor SelectionTextColor { get; set; }
Property Value
| Type |
|---|
| UIKit.UIColor |
Site
Gets or sets the design.
Declaration
public ISite Site { get; set; }
Property Value
| Type |
|---|
| System.ComponentModel.ISite |
VisibleSegmentsCount
Gets or sets the value to show the segments in the available space in SfSegmentedControl. As it overrides to segment width property, other segments can be viewed by scrolling.
Declaration
public Nullable<int> VisibleSegmentsCount { get; set; }
Property Value
| Type |
|---|
| System.Nullable<System.Int32> |
Methods
AwakeFromNib()
Awakes from nib.
Declaration
public override void AwakeFromNib()
Dispose(Boolean)
Declaration
protected override void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing |
LayoutSubviews()
Position all children within this layout.
Declaration
public override void LayoutSubviews()
ScrollTo(Int32, ScrollToPosition)
Scroll the segment item based on the given index and ScrollToPosition.
Declaration
public void ScrollTo(int index, ScrollToPosition scrollToPosition)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Int32 | index | Index value |
| ScrollToPosition | scrollToPosition | Scroll position |
ScrollTo(Object, ScrollToPosition)
Scroll to the segment item based on the provided segment item and ScrollToPosition.
Declaration
public void ScrollTo(object item, ScrollToPosition scrollToPosition)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Object | item | Item object |
| ScrollToPosition | scrollToPosition | Scroll to position |
Events
Disposed
Dispose event handler
Declaration
public event EventHandler Disposed
Event Type
| Type |
|---|
| System.EventHandler |
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
| Type |
|---|
| System.ComponentModel.PropertyChangedEventHandler |
SelectionChanged
Occurs when index changed.
Declaration
public event EventHandler<SelectionChangedEventArgs> SelectionChanged
Event Type
| Type |
|---|
| System.EventHandler<SelectionChangedEventArgs> |