The .NET MAUI Segmented Control offers choices from a linear set of segments containing text, icons, or both, each segment functioning as a discrete button to select options.
Easily get started with the .NET MAUI Segmented Control using a few simple lines of XAML and C# code example as demonstrated below. Also, explore our .NET MAUI Segmented Control Example that shows how to render and configure a Segmented Control in .NET MAUI.
<ContentPage
xmlns:buttons="clr-namespace:Syncfusion.Maui.Buttons;assembly=Syncfusion.Maui.Buttons">
<buttons:SfSegmentedControl x:Name="segmentedControl">
<buttons:SfSegmentedControl.ItemsSource>
<x:Array Type="{x:Type x:String}">
<x:String>Day</x:String>
<x:String>Week</x:String>
<x:String>Month</x:String>
<x:String>Year</x:String>
</x:Array>
</buttons:SfSegmentedControl.ItemsSource>
</buttons:SfSegmentedControl>
</ContentPage>
using Syncfusion.Maui.Buttons;
public partial class MainPage : ContentPage
{
public MainPage()
{
InitializeComponent();
SfSegmentedControl segmentedControl = new SfSegmentedControl();
List<SfSegmentItem> itemList = new List<SfSegmentItem>
{
new SfSegmentItem() {Text = "Day"},
new SfSegmentItem() {Text = "Week"},
new SfSegmentItem() {Text = "Month"},
new SfSegmentItem() {Text = "Year"},
};
segmentedControl.ItemsSource = itemList;
this.Content = segmentedControl;
}
}
The Segmented control elegantly displays text, images, or a combination of text and an image in a modern design.
Displays the text in the segmented items of the control.
Displays images in the segmented items of the control.
Displays images and the text in the segmented items of the control.
The .NET MAUI Segmented control provides four types of selection indicator placement: Fill, border, top, and bottom border.
The selection indicator will fill the selected segment to clearly show it is selected.
The selection indicator will be highlighted with the border of the selected segment.
The selection indicator will be placed at the top of the selected segment.
The selection indicator will be placed at the bottom of the selected segment.
The .NET MAUI Segmented control allows users to easily disable interaction and selection for certain segmented items if the “is enabled” option is set to false.
When there is not enough space to display all the items in the Segmented control, items beyond the edges of the control can be viewed by scrolling.
The .NET MAUI Segmented control supports displaying the segmented items from right to left for users working with RTL languages like Hebrew and Arabic.
Users can customize the segment size, corner radius, background, color, selection color, segment data template, and more.
The Syncfusion .NET MAUI Segmented Control control supports the following features:
You can find our .NET MAUI Segmented Control demo here. It demonstrates how to render and configure the Segmented Control.
No, this is a commercial product and requires a paid license. However, a free community license is also available for companies and individuals whose organizations have less than $1 million USD in annual gross revenue, 5 or fewer developers, and 10 or fewer total employees.
A good place to start would be our comprehensive getting started documentation.
Greatness—it’s one thing to say you have it, but it means more when others recognize it. Syncfusion is proud to hold the following industry awards.