You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

.NET Maui iOS端RadioButton深色模式TextColor失效,文本显示异常?

iOS平台.NET Maui RadioButton的TextColor属性失效问题

这是.NET Maui的已知Bug,在iOS平台上确实存在RadioButton的Content文本忽略TextColor属性设置的情况——即使通过AppThemeBinding指定深色模式下文本为黑色,实际仍会显示白色。

临时解决办法

  • 手动将Content替换为Label组件,直接为Label设置TextColor:
<RadioButton>
    <RadioButton.Content>
        <Label Text="Black Content Text" TextColor="{AppThemeBinding Light=Black, Dark=Black}" />
    </RadioButton.Content>
</RadioButton>
  • 编写iOS平台的自定义渲染器,重写RadioButton的文本颜色渲染逻辑,确保TextColor属性正确生效。

这个问题已被用户在官方反馈渠道提交记录,后续.NET Maui版本大概率会修复该问题,建议留意官方更新日志。

内容的提问来源于stack exchange,提问作者Cef

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.07.30 06:44:55