$npx -y skills add syncfusion/maui-toolkit-ui-components-skills --skill syncfusion-maui-toolkit-segmented-controlImplements 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, app
| 1 | # Implementing Segmented Controls in .NET MAUI |
| 2 | |
| 3 | 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. |
| 4 | |
| 5 | ## When to Use This Skill |
| 6 | |
| 7 | Use this skill when you need to: |
| 8 | |
| 9 | - **Implement view switchers:** Toggle between Day/Week/Month/Year views, list/grid layouts, or different data visualizations |
| 10 | - **Create filter buttons:** Allow users to filter content by category, type, or time period |
| 11 | - **Build tab-like navigation:** Provide segment-based navigation without traditional tabs |
| 12 | - **Design selection interfaces:** Enable users to choose from 2-7 mutually exclusive options |
| 13 | - **Customize segment appearance:** Style borders, backgrounds, colors, corner radius, or selection indicators |
| 14 | - **Configure selection behavior:** Set up programmatic selection, selection modes, or custom indicators |
| 15 | - **Handle segment events:** Respond to selection changes or segment taps |
| 16 | - **Support RTL layouts:** Implement right-to-left language support |
| 17 | - **Apply special effects:** Add liquid glass effects or custom animations |
| 18 | |
| 19 | Common scenarios: Calendar view toggles, chart period selectors, sorting options, display mode switches, category filters, and settings toggles. |
| 20 | |
| 21 | ## Component Overview |
| 22 | |
| 23 | **Key Features:** |
| 24 | |
| 25 | - Multiple display formats (text, icon, or combination) |
| 26 | - Four selection indicator styles (Fill, Border, TopBorder, BottomBorder) |
| 27 | - Scrollable segments for large item counts |
| 28 | - Two selection modes (Single, SingleDeselect) |
| 29 | - Comprehensive appearance customization |
| 30 | - Disabled segment support |
| 31 | - RTL support |
| 32 | - Ripple effect animations |
| 33 | - DataTemplate support for custom layouts |
| 34 | |
| 35 | **Package:** `Syncfusion.Maui.Toolkit` |
| 36 | **Namespace:** `Syncfusion.Maui.Toolkit.SegmentedControl` |
| 37 | **Control Class:** `SfSegmentedControl` |
| 38 | |
| 39 | ## Documentation and Navigation Guide |
| 40 | |
| 41 | ### Getting Started |
| 42 | |
| 43 | 📄 **Read:** [references/getting-started.md](references/getting-started.md) |
| 44 | |
| 45 | Start here for initial setup: |
| 46 | - Installing Syncfusion.Maui.Toolkit NuGet package |
| 47 | - Registering Syncfusion handlers (ConfigureSyncfusionToolkit) |
| 48 | - Basic control initialization in XAML and C# |
| 49 | - Multi-IDE setup (Visual Studio, VS Code, Rider) |
| 50 | - Namespace imports and minimal examples |
| 51 | |
| 52 | ### Populating Segment Items |
| 53 | |
| 54 | 📄 **Read:** [references/populating-items.md](references/populating-items.md) |
| 55 | |
| 56 | For adding segments to the control: |
| 57 | - Using ItemsSource with string arrays |
| 58 | - Creating SfSegmentItem objects |
| 59 | - Adding text, icons, or text+icon combinations |
| 60 | - Image sources and font icon configuration |
| 61 | - Dynamic item population |
| 62 | - Data binding approaches |
| 63 | |
| 64 | ### Selection Features |
| 65 | |
| 66 | 📄 **Read:** [references/selection.md](references/selection.md) |
| 67 | |
| 68 | For controlling selection behavior and appearance: |
| 69 | - Programmatic selection with SelectedIndex |
| 70 | - Selection indicator placements (Fill, Border, TopBorder, BottomBorder) |
| 71 | - Selection modes (Single, SingleDeselect) |
| 72 | - Customizing selected segment colors and backgrounds |
| 73 | - Border customization for selected segments |
| 74 | - Ripple effect animation (EnableRippleEffect) |
| 75 | - Per-item selection styling |
| 76 | |
| 77 | ### Appearance Customization |
| 78 | |
| 79 | 📄 **Read:** [references/customization.md](references/customization.md) |
| 80 | |
| 81 | For styling the control: |
| 82 | - Border color and thickness (Stroke, StrokeThickness) |
| 83 | - Corner radius (CornerRadius, SegmentCornerRadius) |
| 84 | - Text styling (TextStyle, FontAttributes, FontSize) |
| 85 | - Segment background colors |
| 86 | - Per-item customization |
| 87 | - Separator visibility (ShowSeparator) |
| 88 | - DataTemplate customization (SegmentTemplate) |
| 89 | - Selected item templates with IsSelected binding |
| 90 | |
| 91 | ### Layout Configuration |
| 92 | |
| 93 | 📄 **Read:** [references/layout.md](references/layout.md) |
| 94 | |
| 95 | For sizing and layout control: |
| 96 | - Segment width (SegmentWidth, per-item Width) |
| 97 | - Segment height (SegmentHeight) |
| 98 | - Visible segment count (VisibleSegmentsCount) |
| 99 | - Scrolling behavior |
| 100 | - Auto-sizing vs fixed dimensions |
| 101 | |
| 102 | ### Disabled Segments |
| 103 | |
| 104 | 📄 **Read:** [references/disabled-segments.md](references/disabled-segments.md) |
| 105 | |
| 106 | For disabling specific segments: |
| 107 | - Setting IsEnabled per segment |
| 108 | - Visual feedback for disabled state |
| 109 | - Preventing user interaction |
| 110 | - Conditional disabling scenarios |
| 111 | |
| 112 | ### Events |
| 113 | |
| 114 | 📄 **Read:** [references/events.md](references/events.md) |
| 115 | |
| 116 | For handling user interactions: |
| 117 | - SelectionChanged event |
| 118 | - SegmentTapped event |
| 119 | - Event arguments and accessing segment data |
| 120 | - Programmatic response to selection |
| 121 | - Eve |