Skip to content

RadioButton: TextColor for plain Content not working on iOS #18011

@marco-skizza

Description

@marco-skizza

Description

I have a simple RadioButton on a page:

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui"
             xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
             x:Class="MauiRadio8.MainPage">

    <ScrollView>
        <VerticalStackLayout
            HorizontalOptions="Center"
            VerticalOptions="Center"
            Background="Green">

            <RadioButton
                Content="White"
                Value="1"
                TextColor="White" />

        </VerticalStackLayout>
    </ScrollView>

</ContentPage>

On iOS the TextColor is not taken into account:
MauiRadio8-iOS
On WinUI for example the text appears correctly in white:
MauiRadio8-WinUI

Steps to Reproduce

  1. Create a new MAUI app from template
  2. Add the above xml in the MainPage.xaml

Link to public reproduction project repository

https://github.com/marco-skizza/MauiRadioButtonTextColor

Version with bug

8.0.0-rc.2.9373

Is this a regression from previous behavior?

No, this is something new

Last version that worked well

Unknown/Other

Affected platforms

iOS

Affected platform versions

Tested on iPad mini 6, iPadOS 16.7.1

Did you find any workaround?

Even though not so nice, it can be fixed with custom Content:

            <RadioButton
                Value="1">
                <RadioButton.Content>
                    <Label TextColor="White">White</Label>
                </RadioButton.Content>
            </RadioButton>

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-radiobuttonRadioButton, RadioButtonGrouppartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/ioss/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions