颜色随移动黑暗模式自动变化
Color automatically change with mobile darkmode
如果目标设备启用了深色模式,谁能告诉我为什么 Xamarin.Forms
应用程序中的颜色会发生变化。
这是我的代码:
<Setter Property="BackgroundColor" Value="{ AppThemeBinding Dark=#99f2c8}" />
和 AppShell.xaml
我将 FlyoutBackgroundColor
设置为 #ffff
当我的设备处于灯光模式时,我们会看到类似这样的内容:
enter image description here
如果它处于黑暗模式,我们将看到:
enter image description here
我的颜色会自动变暗。我该如何预防?
你有小米吗?
启用深色模式后,会出现一个新菜单:“更多深色模式选项”。您可以在那里关闭“自动调整文本和背景”以解决问题。
据我所知,Yoy 无法控制 Xamarin 中的这些额外设置,因此大多数用户不会受到影响。
如果目标设备启用了深色模式,谁能告诉我为什么 Xamarin.Forms
应用程序中的颜色会发生变化。
这是我的代码:
<Setter Property="BackgroundColor" Value="{ AppThemeBinding Dark=#99f2c8}" />
和 AppShell.xaml
我将 FlyoutBackgroundColor
设置为 #ffff
当我的设备处于灯光模式时,我们会看到类似这样的内容:
enter image description here
如果它处于黑暗模式,我们将看到: enter image description here
我的颜色会自动变暗。我该如何预防?
你有小米吗?
启用深色模式后,会出现一个新菜单:“更多深色模式选项”。您可以在那里关闭“自动调整文本和背景”以解决问题。
据我所知,Yoy 无法控制 Xamarin 中的这些额外设置,因此大多数用户不会受到影响。