Plugin.Maui.SegmentedControl 3.0.0

dotnet add package Plugin.Maui.SegmentedControl --version 3.0.0
                    
NuGet\Install-Package Plugin.Maui.SegmentedControl -Version 3.0.0
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Plugin.Maui.SegmentedControl" Version="3.0.0" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Plugin.Maui.SegmentedControl" Version="3.0.0" />
                    
Directory.Packages.props
<PackageReference Include="Plugin.Maui.SegmentedControl" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Plugin.Maui.SegmentedControl --version 3.0.0
                    
#r "nuget: Plugin.Maui.SegmentedControl, 3.0.0"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package Plugin.Maui.SegmentedControl@3.0.0
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Plugin.Maui.SegmentedControl&version=3.0.0
                    
Install as a Cake Addin
#tool nuget:?package=Plugin.Maui.SegmentedControl&version=3.0.0
                    
Install as a Cake Tool

Plugin.Maui.SegmentedControl

.NET MAUI Port of Alex Rainman XF Segmented control https://github.com/alexrainman/SegmentedControl

Setup

Platform Support

Platform Supported Version Renderer
iOS Yes iOS 15.0+ UISegmentedControl
Android Yes API 24+ RadioGroup
Mac Catalyst Yes 17.0+ UISegmentedControl
Windows Yes 10.0.19041+ WinUI 3 Segmented (Community Toolkit port)

Screenshot

Screenshot

Usage

In your MaiuProgram file call:

var builder = MauiApp.CreateBuilder();
		builder
			.UseMauiApp<App>()
			.UseSegmentedControl();
XAML
xmlns:controls="clr-namespace:Plugin.Maui.SegmentedControl;assembly=Plugin.Maui.SegmentedControl"
<controls:SegmentedControl x:Name="SegControl" TintColor="#007AFF" SelectedSegment="0">
  <controls:SegmentedControl.Children>
    <controls:SegmentedControlOption Text="Tab 1" />
    <controls:SegmentedControlOption Text="Tab 2" />
    <controls:SegmentedControlOption Text="Tab 3" />
    <controls:SegmentedControlOption Text="Tab 4" />
  </controls:SegmentedControl.Children>
</controls:SegmentedControl>
<StackLayout x:Name="SegContent">
</StackLayout>
Event handler
public void Handle_ValueChanged(object o, int e)
{
	SegContent.Children.Clear();

	switch (e)
	{
		case 0:
			SegContent.Children.Add(new Label() { Text="Tab 1 selected" });
			break;
		case 1:
			SegContent.Children.Add(new Label() { Text = "Tab 2 selected" });
			break;
		case 2:
			SegContent.Children.Add(new Label() { Text = "Tab 3 selected" });
			break;
		case 3:
			SegContent.Children.Add(new Label() { Text = "Tab 4 selected" });
			break;
	}
}

Bindable Properties

TintColor: Fill color for the control (Color, default #007AFF)

SelectedTextColor: Selected segment text color (Color, default #FFFFFF)

TextColor: Text color for unselected segments (Color, default #000000)

SelectedSegment: Selected segment index (int, default 0)

FontSize: Font size for segment text (double, default 14.0)

Padding: Padding for segment content (Thickness, default 0)

DisabledBackgroundColor: Background color for disabled unselected segments (Color, default Gray)

DisabledTextColor: Text color for disabled segments (Color, default Gray)

DisabledTintColor: Tint color for disabled selected segments (Color, default Gray)

Event Handlers

ValueChanged: Called when a segment is selected.

Product Compatible and additional computed target framework versions.
.NET net11.0 is compatible.  net11.0-android37.0 is compatible.  net11.0-ios27.2 is compatible.  net11.0-maccatalyst27.2 is compatible.  net11.0-windows10.0.19041 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
3.0.0 111 11/25/2026
2.0.0 3,414 11/26/2025
1.1.0 5,066 1/28/2025
1.0.8 15,866 2/26/2024
1.0.7 3,474 11/30/2023
1.0.6 1,569 10/5/2023
1.0.5 317 10/3/2023
1.0.4 274 10/2/2023
1.0.3 3,694 8/2/2023
1.0.2 318 8/2/2023
1.0.1 305 8/2/2023
1.0.0 397 8/2/2023 1.0.0 is deprecated because it is no longer maintained.

Targets .NET 11 / .NET MAUI 11 (for .NET 10 use the 2.x releases).
Minimum Android API 24 and Mac Catalyst 17.0. iOS and Mac Catalyst now raise SegmentTapped and honour GroupToggleBehavior, matching Android and Windows.
Windows (WinUI 3) support.