syncfusion-maui-radio-button

$npx mdskill add syncfusion/maui-ui-components-skills/syncfusion-maui-radio-button

Implement mutually exclusive radio button selection controls in .NET MAUI.

  • Users need to select one option from a set of choices.
  • Depends on Syncfusion .NET MAUI SfRadioButton component.
  • Uses GroupKey or SfRadioGroup to enforce mutual exclusivity.
  • Returns configured radio buttons with state management and events.

SKILL.md

.github/skills/syncfusion-maui-radio-buttonView on GitHub ↗
---
name: syncfusion-maui-radio-button
description: Implements Syncfusion .NET MAUI Radio Button (SfRadioButton) for mutually exclusive selection controls. Use when implementing radio buttons, selection controls with mutually exclusive options, or grouped radio buttons in .NET MAUI applications. Covers radio button state management, grouping mechanisms (GroupKey or SfRadioGroup), events, and visual customization.
metadata:
  author: "Syncfusion Inc"
  version: "34.1.29"
---

# Implementing .NET MAUI Radio Buttons

Guide for implementing Syncfusion .NET MAUI Radio Button (SfRadioButton) - a selection control that allows users to select one option from a set with checked and unchecked states.

## When to Use This Skill

Use this skill when you need to:
- Implement radio buttons for mutually exclusive selections in .NET MAUI
- Create grouped radio button sets where only one option can be selected
- Handle radio button state changes and user interactions
- Customize radio button appearance (colors, sizing, text styling)
- Implement GroupKey-based or SfRadioGroup-based grouping
- Work with radio button events (StateChanged, StateChanging)
- Apply VisualStateManager to radio buttons
- Create forms with single-selection options (payment methods, preferences, etc.)

## Component Overview

The Syncfusion .NET MAUI Radio Button (SfRadioButton) provides:
- **Two States:** Checked and unchecked with visual feedback
- **Grouping:** Multiple approaches (SfRadioGroup, GroupKey) for mutual exclusion
- **Events:** StateChanged and StateChanging for interaction handling
- **Customization:** Extensive styling options for colors, text, sizing
- **Visual States:** VisualStateManager integration for advanced styling

## Documentation and Navigation Guide

### Getting Started
📄 **Read:** [references/getting-started.md](references/getting-started.md)
- Installing Syncfusion.Maui.Buttons NuGet package
- Registering the Syncfusion handler in MauiProgram.cs
- Creating your first SfRadioButton (XAML and C#)
- Setting caption text with the Text property
- Managing radio button state with IsChecked
- Basic SfRadioGroup usage for mutual exclusion
- Minimal working examples to get started quickly

### Grouping and Organization
📄 **Read:** [references/grouping.md](references/grouping.md)
- GroupKey approach: Group radio buttons across different layouts
- CheckedItem property: Retrieve the currently selected radio button
- SfRadioGroup container: Automatic mutual exclusion management
- CheckedChanged event: Respond to selection changes in groups
- Orientation options: Vertical (default) or horizontal layouts
- SelectedValue property: Bind to selected radio button values
- Choosing between GroupKey and SfRadioGroup approaches
- Multiple independent groups in the same view
- Advanced grouping scenarios and patterns

### Events and Interaction
📄 **Read:** [references/events.md](references/events.md)
- StateChanged event: Detect when radio button state changes
- StateChangedEventArgs: Access new state information
- StateChanging event: Intercept and cancel state changes
- Event handler implementation patterns (XAML and C#)
- Preventing unwanted state changes with event cancellation
- Event timing and lifecycle considerations
- Practical scenarios: validation, confirmation dialogs
- Responding to user interactions programmatically

### Visual Customization
📄 **Read:** [references/visual-customization.md](references/visual-customization.md)
- CheckedColor and UncheckedColor: Customize state colors
- StrokeThickness: Adjust radio button border (platform considerations)
- Text appearance: TextColor, FontFamily, FontAttributes, FontSize
- HorizontalTextAlignment: Control text positioning
- LineBreakMode: Text wrapping and truncation options
- ControlSize: Adjust radio button dimensions
- ContentSpacing: Control spacing between button and text
- FontAutoScalingEnabled: Automatic font scaling for accessibility
- EnabledAnimation: Control state change animations
- Complete styling examples and best practices

### Visual States
📄 **Read:** [references/visual-states.md](references/visual-states.md)
- VisualStateManager integration with SfRadioButton
- Available visual states: Checked and Unchecked
- Defining visual states in XAML
- Creating visual states programmatically in C#
- Customizing appearance for each state
- Applying multiple property setters per state
- Complete working examples
- Best practices for visual state management

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.