Class SfSegmentedControl
SegmentedControl View lets users explore and switch among different views.
Inheritance
Implements
Namespace: Syncfusion.XForms.WPF.Buttons
Assembly: Syncfusion.Buttons.XForms.WPF.dll
Syntax
public class SfSegmentedControl : ItemsControl, IDisposable, INotifyPropertyChanged
Constructors
SfSegmentedControl()
Initializes a new instance of the SfSegmentedControl class.
Declaration
public SfSegmentedControl()
Fields
AutoScrollSelectedItemProperty
Identifies the AutoScrollSelectedItem Xamarin.Forms.BindableProperty.
Declaration
public static readonly DependencyProperty AutoScrollSelectedItemProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
BackgroundProperty
Identifies the Background Xamarin.Forms.BindableProperty.
Declaration
public static readonly DependencyProperty BackgroundProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
BorderThicknessProperty
Identifies the BorderThickness Xamarin.Forms.BindableProperty.
Declaration
public static readonly DependencyProperty BorderThicknessProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
CornerRadiusProperty
Identifies the CornerRadius Xamarin.Forms.BindableProperty.
Declaration
public static readonly DependencyProperty CornerRadiusProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
DisplayModeProperty
Identifies the DisplayMode Xamarin.Forms.BindableProperty.
Declaration
public static readonly DependencyProperty DisplayModeProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
ScrollToPositionProperty
Identifies the ScrollToPosition Xamarin.Forms.BindableProperty.
Declaration
public static readonly DependencyProperty ScrollToPositionProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
SegmentBorderThicknessProperty
Identifies the SegmentBorderThickness Xamarin.Forms.BindableProperty.
Declaration
public static readonly DependencyProperty SegmentBorderThicknessProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
SegmentPaddingProperty
Identifies the SegmentPadding Xamarin.Forms.BindableProperty.
Declaration
public static readonly DependencyProperty SegmentPaddingProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
SelectedIndexProperty
Identifies the SelectedIndex Xamarin.Forms.BindableProperty.
Declaration
public static readonly DependencyProperty SelectedIndexProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
SelectionIndicatorSettingsProperty
Identifies the SelectionIndicatorSettings Xamarin.Forms.BindableProperty.
Declaration
public static readonly DependencyProperty SelectionIndicatorSettingsProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
VisibleSegmentsCountProperty
Identifies the VisibleSegmentsCount Xamarin.Forms.BindableProperty.
Declaration
public static readonly DependencyProperty VisibleSegmentsCountProperty
Field Value
| Type |
|---|
| System.Windows.DependencyProperty |
Remarks
This Xamarin.Forms.BindableProperty is read-only.
Properties
AutoScrollSelectedItem
Gets or sets the value that indicates whether to enable the auto scrolling when selected index is changed in SfSegmentedControl.
Declaration
public bool AutoScrollSelectedItem { get; set; }
Property Value
| Type |
|---|
| System.Boolean |
Background
Gets or sets the value to define the background of SfSegmentedControl
Declaration
public Brush Background { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.Brush |
BorderThickness
Gets or sets the value to define the border thickness of segment.
Declaration
public Thickness BorderThickness { get; set; }
Property Value
| Type |
|---|
| System.Windows.Thickness |
CornerRadius
Gets or sets the corner radius value for the border of SfSegmentedControl.
Declaration
public CornerRadius CornerRadius { get; set; }
Property Value
| Type |
|---|
| System.Windows.CornerRadius |
DisabledTextBackground
Gets or sets the background color of disabled segment items in SfSegmentedControl.
Declaration
public SolidColorBrush DisabledTextBackground { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.SolidColorBrush |
DisabledTextColor
Gets or sets the text color of disabled segment items in SfSegmentedControl.
Declaration
public SolidColorBrush DisabledTextColor { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.SolidColorBrush |
DisplayMode
Gets or sets the value to define the type of segment. By default, it will display title from SfSegmentItem or the string value.
Declaration
public SegmentDisplayMode DisplayMode { get; set; }
Property Value
| Type |
|---|
| SegmentDisplayMode |
FontIconFontColor
Gets or sets the value for the color of font icon text for a segment item.
Declaration
public Brush FontIconFontColor { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.Brush |
FontIconFontSize
Gets or sets the value for the font size of icon font text for a segment item.
Declaration
public double FontIconFontSize { get; set; }
Property Value
| Type |
|---|
| System.Double |
FontIconStyle
Gets or sets the value for the font family of icon font text for a segment item.
Declaration
public FontFamily FontIconStyle { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.FontFamily |
ScrollToPosition
Gets or sets a value for positioning the selected index at a specific position of SfSegmentedControl when AutoScrollSelectedItem is set to true.
Declaration
public ScrollToPosition ScrollToPosition { get; set; }
Property Value
| Type |
|---|
| ScrollToPosition |
SegmentBackgroundColor
Gets or sets the background color of SfSegmentItem.
Declaration
public SolidColorBrush SegmentBackgroundColor { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.SolidColorBrush |
SegmentBorderColor
Gets or sets the border color of SfSegmentItem.
Declaration
public SolidColorBrush SegmentBorderColor { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.SolidColorBrush |
SegmentBorderThickness
Gets or sets the value to define the border thickness of SfSegmentedItem
Declaration
public Thickness SegmentBorderThickness { get; set; }
Property Value
| Type |
|---|
| System.Windows.Thickness |
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 the value to define the padding of SfSegmentedItem
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
Declaration
public int SelectedIndex { get; set; }
Property Value
| Type |
|---|
| System.Int32 |
SelectionAnimationDuration
Gets or sets the selection animation duration.
Declaration
public double SelectionAnimationDuration { get; set; }
Property Value
| Type |
|---|
| System.Double |
SelectionBackgroundColor
Gets or sets the background color of the selected segment in SfSegmentedControl.
Declaration
public SolidColorBrush SelectionBackgroundColor { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.SolidColorBrush |
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 SolidColorBrush SelectionTextColor { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.SolidColorBrush |
TitleFontColor
Gets or sets the value for the color of text for a segment item.
Declaration
public Brush TitleFontColor { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.Brush |
TitleFontSize
Gets or sets the value for the font size of text for a segment item.
Declaration
public double TitleFontSize { get; set; }
Property Value
| Type |
|---|
| System.Double |
TitleFontStyle
Gets or sets the value for the font representation of text for a segment item.
Declaration
public FontFamily TitleFontStyle { get; set; }
Property Value
| Type |
|---|
| System.Windows.Media.FontFamily |
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 int? VisibleSegmentsCount { get; set; }
Property Value
| Type |
|---|
| System.Nullable<System.Int32> |
Methods
Dispose()
Releases the unmanaged resources used by the component and optionally releases the managed resources.
Declaration
public void Dispose()
Dispose(Boolean)
Releases the unmanaged resources used by the component and optionally releases the managed resources.
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Boolean | disposing | if true - release both managed and unmanaged resources; if false - release only unmanaged resources. |
MeasureOverride(Size)
Declaration
protected override Size MeasureOverride(Size availableSize)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Windows.Size | availableSize |
Returns
| Type |
|---|
| System.Windows.Size |
OnApplyTemplate()
Declaration
public override void OnApplyTemplate()
Events
PropertyChanged
Declaration
public event PropertyChangedEventHandler PropertyChanged
Event Type
| Type |
|---|
| System.ComponentModel.PropertyChangedEventHandler |