Class
RadSegmentedControl

Displays a list of horizontally aligned, mutually exclusive options, which can be selected by the user. Each option is a button that can display text or an image.

Definition

Namespace:Telerik.Maui.Controls

Assembly:Telerik.Maui.Controls.dll

Syntax:

cs-api-definition
public class RadSegmentedControl : RadView, IRadSegmentedControl, IView, IElement, ITransform

Inheritance: objectRadViewRadSegmentedControl

Implements: IElementIRadSegmentedControlITransformIView

Inherited Members RadView.OnNativeControlLoaded()RadView.OnNativeControlUnloaded()RadView.IsDefaultValue(string)RadView.OnPropertyChanged(string)RadView.IsOperational

Constructors

RadSegmentedControl()

Initializes a new instance of the RadSegmentedControl class.

Declaration

cs-api-definition
public RadSegmentedControl()

Fields

DisabledSegmentTextColorProperty

Identifies the DisabledSegmentTextColor property.

Declaration

cs-api-definition
public static readonly BindableProperty DisabledSegmentTextColorProperty

Field Value

BindableProperty

ItemsSourceProperty

Identifies the ItemsSource property.

Declaration

cs-api-definition
public static readonly BindableProperty ItemsSourceProperty

Field Value

BindableProperty

SegmentBackgroundColorProperty

Identifies the SegmentBackgroundColor property.

Declaration

cs-api-definition
public static readonly BindableProperty SegmentBackgroundColorProperty

Field Value

BindableProperty

SegmentTextColorProperty

Identifies the SegmentTextColor property.

Declaration

cs-api-definition
public static readonly BindableProperty SegmentTextColorProperty

Field Value

BindableProperty

SelectedIndexProperty

Identifies the SelectedIndex property.

Declaration

cs-api-definition
public static readonly BindableProperty SelectedIndexProperty

Field Value

BindableProperty

SelectedItemProperty

Identifies the SelectedItem property.

Declaration

cs-api-definition
public static readonly BindableProperty SelectedItemProperty

Field Value

BindableProperty

SelectedSegmentBackgroundColorProperty

Identifies the SelectedSegmentBackgroundColor property.

Declaration

cs-api-definition
public static readonly BindableProperty SelectedSegmentBackgroundColorProperty

Field Value

BindableProperty

SelectedSegmentTextColorProperty

Identifies the SelectedSegmentTextColor property.

Declaration

cs-api-definition
public static readonly BindableProperty SelectedSegmentTextColorProperty

Field Value

BindableProperty

Properties

DisabledSegmentTextColor

Gets or sets the text color of the disabled segment.

Declaration

cs-api-definition
public Color DisabledSegmentTextColor { get; set; }

Property Value

Color

Implements IRadSegmentedControl.DisabledSegmentTextColor

ItemsSource

Gets or sets the collection of items of the control.

Declaration

cs-api-definition
public IEnumerable ItemsSource { get; set; }

Property Value

IEnumerable

Implements IRadSegmentedControl.ItemsSource

SegmentBackgroundColor

Gets or sets the background color of the segment.

Declaration

cs-api-definition
public Color SegmentBackgroundColor { get; set; }

Property Value

Color

Implements IRadSegmentedControl.SegmentBackgroundColor

SegmentTextColor

Gets or sets the text color of the segment.

Declaration

cs-api-definition
public Color SegmentTextColor { get; set; }

Property Value

Color

Implements IRadSegmentedControl.SegmentTextColor

SelectedIndex

Gets or sets the index of the item to be selected.

Declaration

cs-api-definition
public int SelectedIndex { get; set; }

Property Value

int

Implements IRadSegmentedControl.SelectedIndex

SelectedItem

Gets or sets the currently selected item.

Declaration

cs-api-definition
public object SelectedItem { get; set; }

Property Value

object

SelectedSegmentBackgroundColor

Gets or sets the background color of the selected segment.

Declaration

cs-api-definition
public Color SelectedSegmentBackgroundColor { get; set; }

Property Value

Color

Implements IRadSegmentedControl.SelectedSegmentBackgroundColor

SelectedSegmentTextColor

Gets or sets the text color of the selected segment.

Declaration

cs-api-definition
public Color SelectedSegmentTextColor { get; set; }

Property Value

Color

Implements IRadSegmentedControl.SelectedSegmentTextColor

Methods

IsSegmentEnabled(int)

Determines if the specified segment is enabled.

Declaration

cs-api-definition
public bool IsSegmentEnabled(int index)

Parameters

index

int

The index of the segment.

Returns

bool

The state of the segment: True - enabled, False - disabled.

OnHandlerChanged()

Declaration

cs-api-definition
protected override void OnHandlerChanged()

Overrides RadView.OnHandlerChanged()

SetSegmentEnabled(int, bool)

Sets the enabled state of the specified segment.

Declaration

cs-api-definition
public void SetSegmentEnabled(int index, bool isEnabled)

Parameters

index

int

The index of the segment to enable or disable.

isEnabled

bool

The new state of the segment: True - enabled, False - disabled.

Events

SelectionChanged

Raised when the current selection has changed.

Declaration

cs-api-definition
public event EventHandler<ValueChangedEventArgs<int>> SelectionChanged

Event Value

EventHandler<ValueChangedEventArgs<int>>