Fabulous API
Documentation
2.0
2.0
  • Welcome
  • Xamarin.Forms
    • AnyView
    • Application
    • Element
    • NavigableElement
    • VisualElement
    • View
    • Controls
      • ActivityIndicator
      • BoxView
      • Button
      • CheckBox
      • DatePicker
      • Editor
      • Entry
      • FormattedLabel
      • ImageButton
      • Image
      • IndicatorView
      • InputView
      • Label
      • Picker
      • ProgressBar
      • RadioButton
      • SearchBar
      • Slider
      • Span
      • Stepper
      • Switch
      • TimePicker
      • WebView
    • Collections
      • CarouselView
      • CollectionView
      • ItemsView
      • ListView
    • Layouts
      • Layout
      • TemplatedView
  • .NET MAUI
    • AnyView
    • Application
    • Element
    • NavigableElement
    • VisualElement
    • View
    • Controls
      • ActivityIndicator
      • BoxView
      • Button
      • CheckBox
      • DatePicker
      • Editor
      • Entry
      • FormattedLabel
      • ImageButton
      • Image
      • IndicatorView
      • InputView
      • Label
      • Picker
      • ProgressBar
      • RadioButton
      • SearchBar
      • Slider
      • Span
      • Stepper
      • Switch
      • TimePicker
      • WebView
    • Collections
      • CarouselView
      • CollectionView
      • ItemsView
      • ListView
    • Layouts
      • Layout
      • TemplatedView
  • Avalonia
    • AnyView
    • Application
    • RenderOptions
    • Animatable
    • StyledElement
    • Transform
    • Visual
    • Layoutable
    • InputElement
    • DragDrop
    • FlyoutBase
    • PopupFlyoutBase
    • Control
    • Decorator
    • TemplatedControl
    • ContentControl
    • Spinner
    • TopLevel
    • TextElement
    • ItemsControl
    • SelectingItemsControl
    • MenuBase
    • WindowBase
    • Styling
      • KeyFrame
      • Animation
      • Transition
      • Style
    • Media
      • Transforms
        • Transform
        • MatrixTransform
        • SkewTransform
        • RotateTransform
        • TranslateTransform
        • ScaleTransform
        • Rotate3DTransform
        • TransformGroup
      • Brushes
        • Brush
        • TileBrush
        • SolidColorBrush
        • VisualBrush
        • ImageBrush
        • DrawingBrush
        • GradientStop
        • GradientBrush
        • ConicGradientBrush
        • LinearGradientBrush
        • RadialGradientBrush
      • PathSegments
        • PathSegment
        • ArcSegment
        • BezierSegment
        • PolyLineSegment
        • QuadraticBezierSegment
        • PathFigure
      • Geometries
        • Geometry
        • LineGeometry
        • EllipseGeometry
        • RectangleGeometry
        • PolylineGeometry
        • PathGeometry
        • CombinedGeometry
        • GeometryGroup
      • DashStyle
      • Pen
      • Drawing
      • Effects
Powered by GitBook
On this page
  • Constructors
  • Properties
  • Usages
Edit on GitHub
  1. Xamarin.Forms
  2. Controls

RadioButton

PreviousProgressBarNextSearchBar

Last updated 1 year ago

Inheritance: -> -> -> -> -> Xamarin.Forms documentation: RadioButton /

For details on how the control actually works, please refer to the .

Constructors

Constructors
Description

RadioButton(isChecked: bool, onChecked: bool -> ‘msg)

Define a default RadioButton widget with the checked state

RadioButton(content: string, isChecked: bool, onChecked: bool -> ‘msg)

Define a RadioButton widget with a text and the checked state

Properties

Properties
Description

borderColor(light: FabColor, ?dark: FabColor)

Sets the border color depending if light or dark mode

groupName(value: string)

Sets the group name

borderWidth(value: float)

Sets the border width

characterSpacing(spacing: float)

Sets the character spacing

cornerRadius(value: float)

Sets the corner radius

font(?size: float, ?namedSize: NamedSize, ?attributes: FontAttributes, ?fontFamily: string)

Sets the font

textColor(light: FabColor, ?dark: FabColor)

Sets the text color

textTransform(value: TextTransform)

Sets the transformation for the text

reference(value: ViewRef<RadioButton>)

Sets a ViewRef instance to retrieve the Xamarin.Forms.RadioButton instance associated to this widget

Usages

RadioButton(model.IsChecked, CheckedChangedMsg)
    .progressColor(Color.Red.ToFabColor(), dark = Color.Blue.ToFabColor())
    .borderColor(Color.Red.ToFabColor(), dark = Color.Blue.ToFabColor())  
    .groupName("MyGroup") 
    .borderWidth(10.) 
    .characterSpacing(2.) 
    .cornerRadius(5.) 
    
RadioButton("Cat", model.IsChecked, CheckedChangedMsg)
    .font(namedSize = NamedSize.Large, fontFamily = "Arial", attributes = FontAttributes.Bold)
    .textColor(Color.Red.ToFabColor(), dark = Color.Blue.ToFabColor()) 
    .textTransform(TextTransform.Lowercase)
let radioButtonRef = ViewRef<RadioButton>()

RadioButton(model.IsChecked, CheckedChangedMsg)
    .reference(radioButtonRef)

Get access to the underlying Xamarin.Forms.RadioButton

Element
NavigableElement
VisualElement
View
Layout
TemplatedView
API
Guide
Xamarin.Forms documentation
#