syncfusion-maui-segmented-control

$npx mdskill add syncfusion/maui-ui-components-skills/syncfusion-maui-segmented-control

Implement segmented controls for tab-like selection in .NET MAUI apps.

  • Enables view switching, filtering, or selection from mutually exclusive options.
  • Depends on Syncfusion .NET MAUI Segmented Control (SfSegmentedControl) NuGet package.
  • Configures segments, selection indicators, appearance, layout, and events based on user needs.
  • Generates XAML or C# code to integrate the segmented control into the MAUI application.

SKILL.md

.github/skills/syncfusion-maui-segmented-controlView on GitHub ↗
---
name: syncfusion-maui-segmented-control
description: Implements Syncfusion .NET MAUI Segmented Control (SfSegmentedControl). Use when working with segmented controls, segment buttons, tab-like selection, button groups, or filter buttons in MAUI applications. This skill covers installation, item population, selection indicators, appearance customization, layout configuration, disabled segments, and events.
metadata:
  author: "Syncfusion Inc"
  version: "34.1.29"
---

# Implementing Segmented Controls in .NET MAUI

The Syncfusion .NET MAUI Segmented Control (SfSegmentedControl) provides a linear set of segments containing text, icons, or both, allowing users to select from mutually exclusive options. Each segment functions as a discrete button, creating an intuitive way to switch between views, filter content, or select time periods.

## When to Use This Skill

Use this skill when you need to:

- **Implement view switchers:** Toggle between Day/Week/Month/Year views, list/grid layouts, or different data visualizations
- **Create filter buttons:** Allow users to filter content by category, type, or time period
- **Build tab-like navigation:** Provide segment-based navigation without traditional tabs
- **Design selection interfaces:** Enable users to choose from 2-7 mutually exclusive options
- **Customize segment appearance:** Style borders, backgrounds, colors, corner radius, or selection indicators
- **Configure selection behavior:** Set up programmatic selection, selection modes, or custom indicators
- **Handle segment events:** Respond to selection changes or segment taps
- **Support RTL layouts:** Implement right-to-left language support
- **Apply special effects:** Add liquid glass effects or custom animations

Common scenarios: Calendar view toggles, chart period selectors, sorting options, display mode switches, category filters, and settings toggles.

## Component Overview

**Key Features:**
- Multiple display formats (text, icon, or combination)
- Four selection indicator styles (Fill, Border, TopBorder, BottomBorder)
- Scrollable segments for large item counts
- Two selection modes (Single, SingleDeselect)
- Comprehensive appearance customization
- Disabled segment support
- RTL support
- Ripple effect animations
- DataTemplate support for custom layouts

**Package:** `Syncfusion.Maui.Buttons`  
**Namespace:** `Syncfusion.Maui.Buttons`  
**Control Class:** `SfSegmentedControl`

## Documentation and Navigation Guide

### Getting Started

📄 **Read:** [references/getting-started.md](references/getting-started.md)

Start here for initial setup:
- Installing Syncfusion.Maui.Buttons NuGet package
- Registering Syncfusion handlers (ConfigureSyncfusionCore)
- Basic control initialization in XAML and C#
- Multi-IDE setup (Visual Studio, VS Code, Rider)
- Namespace imports and minimal examples

### Populating Segment Items

📄 **Read:** [references/populating-items.md](references/populating-items.md)

For adding segments to the control:
- Using ItemsSource with string arrays
- Creating SfSegmentItem objects
- Adding text, icons, or text+icon combinations
- Image sources and font icon configuration
- Dynamic item population
- Data binding approaches

### Selection Features

📄 **Read:** [references/selection.md](references/selection.md)

For controlling selection behavior and appearance:
- Programmatic selection with SelectedIndex
- Selection indicator placements (Fill, Border, TopBorder, BottomBorder)
- Selection modes (Single, SingleDeselect)
- Customizing selected segment colors and backgrounds
- Border customization for selected segments
- Ripple effect animation (EnableRippleEffect)
- Per-item selection styling

### Appearance Customization

📄 **Read:** [references/customization.md](references/customization.md)

For styling the control:
- Border color and thickness (Stroke, StrokeThickness)
- Corner radius (CornerRadius, SegmentCornerRadius)
- Text styling (TextStyle, FontAttributes, FontSize)
- Segment background colors
- Per-item customization
- Separator visibility (ShowSeparator)
- DataTemplate customization (SegmentTemplate)
- Selected item templates with IsSelected binding

### Layout Configuration

📄 **Read:** [references/layout.md](references/layout.md)

For sizing and layout control:
- Segment width (SegmentWidth, per-item Width)
- Segment height (SegmentHeight)
- Visible segment count (VisibleSegmentsCount)
- Scrolling behavior
- Auto-sizing vs fixed dimensions

### Disabled Segments

📄 **Read:** [references/disabled-segments.md](references/disabled-segments.md)

For disabling specific segments:
- Setting IsEnabled per segment
- Visual feedback for disabled state
- Preventing user interaction
- Conditional disabling scenarios

### Events

📄 **Read:** [references/events.md](references/events.md)

For handling user interactions:
- SelectionChanged event
- SegmentTapped event
- Event arguments and accessing segment data
- Programmatic response to selection
- Event-driven UI updates

### Advanced Features

📄 **Read:** [references/advanced-features.md](references/advanced-features.md)

For special capabilities:
- Right-to-left (RTL) support and FlowDirection
- Liquid glass effect styling
- Custom visual effects
- Platform-specific considerations

More from syncfusion/maui-ui-components-skills

SkillDescription
syncfusion-maui-accordionImplements Syncfusion .NET MAUI Accordion (SfAccordion) - a vertically collapsible panel with stacked headers for expanding/collapsing content. Use when working with accordions, collapsible panels, expandable lists, employee lists with details, or FAQ sections in .NET MAUI applications. Covers AccordionItem configuration, expand modes, and grouped content display.
syncfusion-maui-ai-assistviewImplements Syncfusion .NET MAUI AI AssistView (SfAIAssistView) for AI-powered interactive chat interfaces. Use when working with AI chat interfaces, AI AssistView, SfAIAssistView, conversational UI, or chat with AI responses. Covers integrating AI services, creating chat UIs, implementing conversation flows, managing AI requests/responses, and displaying AI suggestions.
syncfusion-maui-autocompleteImplements and configure Syncfusion .NET MAUI Autocomplete (SfAutocomplete) control for intelligent text input with suggestions. Use when implementing autocomplete, autosuggest, type-ahead search, smart search, or filtered dropdowns in .NET MAUI applications. Covers data binding, filtering modes, custom search logic, AI-powered search, multi-selection with tokens, and UI customization.
syncfusion-maui-avatar-viewImplements Syncfusion .NET MAUI Avatar View (SfAvatarView) for displaying user profile pictures, initials, or group avatars. Use when working with avatar views, profile pictures, user images, initials display, profile icons, or contact images. Ideal for implementing user profile displays, contact lists, chat interfaces, or social feeds.
syncfusion-maui-backdropImplements Syncfusion .NET MAUI Backdrop Page (SfBackdropPage) with back layer and front layer surfaces. Use when working with backdrop pages, SfBackdropPage, back layer, front layer, or reveal/conceal animations. Covers backdrop navigation patterns, header icons, corner shapes, reveal height, layer state events, and liquid glass effect.
syncfusion-maui-badge-viewImplements Syncfusion .NET MAUI Badge View (SfBadgeView) control. Use when adding badge notifications, status indicators, unread counts, or notification overlays to MAUI applications. Covers SfBadgeView setup, badge text customization, position adjustments, animations, predefined symbols, and accessibility features.
syncfusion-maui-barcode-generatorImplements Syncfusion .NET MAUI Barcode Generator (SfBarcodeGenerator) for generating machine-readable barcodes. Use when working with barcodes, barcode generation, QR codes, data matrix, EAN codes, UPC codes, Code128, or Code39. This skill covers both one-dimensional (linear) and two-dimensional (matrix) barcode symbologies with extensive customization options.
syncfusion-maui-busy-indicatorImplements Syncfusion .NET MAUI Busy Indicator (SfBusyIndicator) for showing loading states, data processing, and app activity indicators. Use when displaying loading indicators, busy animations, activity spinners, or processing feedback in .NET MAUI apps. Covers busy indicator setup, animations, and visual feedback during long-running operations.
syncfusion-maui-buttonImplements and customize Syncfusion .NET MAUI Button (SfButton) control. Use when working with MAUI buttons, SfButton implementation, button customization, or visual states. Covers button icons, background images, RTL support, Liquid Glass effects, custom button views, button styling, events, and checkable buttons.
syncfusion-maui-calendarImplements and customize Syncfusion .NET MAUI Calendar (SfCalendar) control. Use when implementing calendar functionality, date selection (single, multiple, range), or calendar views (month, year, decade, century). Covers date restrictions (min/max dates, EnablePastDates, SelectableDayPredicate), calendar customization, events (ViewChanged, SelectionChanged, Tapped), and header/footer customization.