No description, website, or topics provided.
Switch branches/tags
Nothing to show
Clone or download
Latest commit b581751 Nov 18, 2018
Failed to load latest commit information.
src readme Nov 18, 2018
.gitignore Address issue #37 by adding ItemsSource property. Nov 14, 2018
LICENSE Initial commit Oct 13, 2017 readme Nov 18, 2018

Plugin Segmented Control for Xamarin Forms and .NET Standard

NuGet Badge

Please star this project if you find it useful. Thank you!

Why this library?

There are other Segmented Control libraries out there. This library adds two important capabilities:

  • It works across all four key platforms: iOS, Android and UWP - all other libraries I've encounted lack UWP and/or MacOS.
  • It's based on .NET Standard 2.0

Furthermore, this library is has more flexibility and features than other libraries that I'm aware of.

Enjoy! And please don't forget to star this project if you find it useful and/or provide feedback if you run into issues or shortcomings.

Supported platforms

Platform Supported Version Renderer
Xamarin.iOS Unified Yes iOS 8.1+ UISegmentedControl
Xamarin.Android Yes API 26+ RadioGroup
Xamarin.UWP Yes Win10 16299+ User Control/RadioButton
Xamarin.MacOS Yes 10.0+ NSSegmentedControl


  • Bindable Tint color
  • Bindable Select color
  • Bindable Disabled color
  • Bindable Font size
  • Bindable Font Family
  • Bindable Item Text
  • Bindable Selected Item
  • Bindable ICommand
  • Bindable IsEnabled Item
  • Bindable ItemsSource

For more details please see below or for even more details see: Test/Demo App

How to used

Using this plugin is easy.


Add initializer to AppDelegate

public override bool FinishedLaunching(UIApplication app, NSDictionary options)



You need to add the assembly to App.xaml.cs in you project. For more details see the Xamarin documentation here.

var assembliesToInclude = new List<Assembly> {typeof(SegmentedControlRenderer).GetTypeInfo().Assembly};

Xamarin.Forms.Forms.Init(e, assembliesToInclude);


No special needs.

For using custom fonts with Android see this blog post:

.NET Standard

The Xamarin Forms must use .NET Standard. I suggest using .NET Standard 2.0+.

Here is a great blog post about how to move your PCL to .NET Standard: Building Xamarin.Forms Apps with .NET Standard


Plugin Segmented Control Picture

<ContentPage xmlns=""

        <OnPlatform x:Key="PlatformFontName" x:TypeArguments="x:String">
            <On Platform="UWP" Value="Courier New"></On>
            <On Platform="Android" Value="Serif"></On>
            <On Platform="iOS" Value="Helvetica"></On>
            <On Platform="macOS" Value="Baskerville"></On>
        <StackLayout BackgroundColor="White" x:Name="SegmentWithStack">
                Text="Welcome to Xamarin.Forms!"
                HorizontalOptions="CenterAndExpand" />
                SelectedSegment="{Binding SelectedSegment, Mode=TwoWay}"
                FontFamily="{StaticResource PlatformFontName}"
                SegmentSelectedCommand="{Binding SegmentChangedCommand}"
                ItemsSource="{Binding SegmentStringSource}">
                    <control:SegmentedControlOption Text="{Binding ChangeText}"/>
                    <control:SegmentedControlOption Text="Item 2"/>
                    <control:SegmentedControlOption Text="Item 3"/>
                    <control:SegmentedControlOption Text="Item 4"/>

You can bind to the SegmentSelectedCommand for notification in your view model when a segment change has occurred.

    SegmentSelectedCommand="{Binding SegmentChangedCommand}"


For inspiration and for the Android and iOS part I'd like to thank Alex Rainman for his great work on SegmentedControl.FormsPlugin.

Thank you to rjantz3 for adding much requested features and enhancements to this control library.