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:
public class RadSegmentedControl : RadBorder, IRadBorder, IRadContentView, IContentView, IView, IElement, ITransform, IPadding, ICrossPlatformLayout
Inheritance: objectRadContentViewRadBorderRadSegmentedControl
Implements:
Inherited Members
Constructors
Initializes a new instance of the RadSegmentedControl class.
public RadSegmentedControl()
Fields
ActualSelectionIndicatorStyleProperty
BindableProperty
Identifies the ActualSelectionIndicatorStyle bindable property.
public static readonly BindableProperty ActualSelectionIndicatorStyleProperty
ActualSeparatorStyleProperty
BindableProperty
Identifies the ActualSeparatorStyle bindable property.
public static readonly BindableProperty ActualSeparatorStyleProperty
ControlTemplateProperty
BindableProperty
Identifies the ControlTemplate bindable property.
public static readonly BindableProperty ControlTemplateProperty
CurrentItemProperty
BindableProperty
Identifies the CurrentItem bindable property.
public static readonly BindableProperty CurrentItemProperty
DisplayMemberPathProperty
BindableProperty
Identifies the DisplayMemberPath bindable property.
public static readonly BindableProperty DisplayMemberPathProperty
ItemsSourceProperty
BindableProperty
Identifies the ItemsSource bindable property.
public static readonly BindableProperty ItemsSourceProperty
ItemTappedCommandProperty
BindableProperty
Identifies the ItemTappedCommand bindable property.
public static readonly BindableProperty ItemTappedCommandProperty
ItemTemplateProperty
BindableProperty
Identifies the ItemTemplate bindable property.
public static readonly BindableProperty ItemTemplateProperty
ItemViewStyleProperty
BindableProperty
Identifies the ItemViewStyle bindable property.
public static readonly BindableProperty ItemViewStyleProperty
ItemViewStyleSelectorProperty
BindableProperty
Identifies the ItemViewStyleSelector bindable property.
public static readonly BindableProperty ItemViewStyleSelectorProperty
PaddingProperty
BindableProperty
Identifies the Padding bindable property.
public static readonly BindableProperty PaddingProperty
SelectedIndexProperty
BindableProperty
Identifies the SelectedIndex bindable property.
public static readonly BindableProperty SelectedIndexProperty
SelectedItemProperty
BindableProperty
Identifies the SelectedItem bindable property.
public static readonly BindableProperty SelectedItemProperty
SelectionIndicatorStyleProperty
BindableProperty
Identifies the SelectionIndicatorStyle bindable property.
public static readonly BindableProperty SelectionIndicatorStyleProperty
SelectionModeProperty
BindableProperty
Identifies the SelectionMode bindable property.
public static readonly BindableProperty SelectionModeProperty
SeparatorStyleProperty
BindableProperty
Identifies the SeparatorStyle bindable property.
public static readonly BindableProperty SeparatorStyleProperty
StyleProperty
BindableProperty
Identifies the Style bindable property.
public static readonly BindableProperty StyleProperty
Properties
Gets the actual style applied to the selection indicator, computed by merging the user-provided SelectionIndicatorStyle with the default style.
public Style ActualSelectionIndicatorStyle { get; }
ActualSeparatorStyle
Style
Gets the actual style applied to the separator rectangles between items, computed by merging the user-provided SeparatorStyle with the default style.
public Style ActualSeparatorStyle { get; }
ControlTemplate
ControlTemplate
Gets or sets the control template of this view.
public ControlTemplate ControlTemplate { get; set; }
Gets or sets the current item in the segmented control for keyboard navigation purposes. This is primarily used on desktop platforms to track which item has keyboard focus. The current item is visually highlighted and can be navigated using arrow keys.
public object CurrentItem { get; set; }
Gets or sets the path to the property of the data item which will be used to display text in each segment.
public string DisplayMemberPath { get; set; }
Gets or sets the collection of items of the control.
public IEnumerable ItemsSource { get; set; }
Gets or sets the command that is executed when a segment item is tapped. The command parameter is the data item of the tapped segment.
public ICommand ItemTappedCommand { get; set; }
ItemTemplate
DataTemplate
Gets or sets the DataTemplate that defines the appearance of each segment item. When set, replaces the default label content with custom content created from this template.
public DataTemplate ItemTemplate { get; set; }
ItemViewStyle
Style
Gets or sets the Style applied uniformly to each RadSegmentedControlItemView. The target type of the style is RadSegmentedControlItemView.
public Style ItemViewStyle { get; set; }
Gets or sets the IStyleSelector that provides per-item style logic for RadSegmentedControlItemView instances. When set, the selector is invoked with the business item and the container view to determine the applied style.
public IStyleSelector ItemViewStyleSelector { get; set; }
Padding
Thickness
Gets or sets the padding inside the control, between its border and content.
public Thickness Padding { get; set; }
Gets or sets the index of the item to be selected.
public int SelectedIndex { get; set; }
Gets or sets the currently selected item.
public object SelectedItem { get; set; }
Gets or sets the selection mode that determines how items can be selected.
public SegmentedControlSelectionMode SelectionMode { get; set; }
SeparatorStyle
Style
Style
Style
Gets or sets the style of this view.
public Style Style { get; set; }
Methods
protected override void OnApplyTemplate()
Events
ItemTapped
EventHandler<RadTappedEventArgs<object>>
Raised when an item is tapped, regardless of the SelectionMode.
public event EventHandler<RadTappedEventArgs<object>> ItemTapped
SelectionChanged
EventHandler<RadSelectionChangedEventArgs>
Raised when the current selection has changed.
public event EventHandler<RadSelectionChangedEventArgs> SelectionChanged