Skip to content
This repository has been archived by the owner on May 1, 2024. It is now read-only.

[Bug] Background stays white under dark theme on iOS #12406

Closed
Silic0nS0ldier opened this issue Oct 8, 2020 · 0 comments · Fixed by #12409
Closed

[Bug] Background stays white under dark theme on iOS #12406

Silic0nS0ldier opened this issue Oct 8, 2020 · 0 comments · Fixed by #12409
Assignees
Labels
a/darkmode blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. in-progress This issue has an associated pull request that may resolve it! p/Android p/iOS 🍎 t/bug 🐛
Projects
Milestone

Comments

@Silic0nS0ldier
Copy link

Description

When dark theme is active the app background color stays white, while other elements (such as text) are correctly styled (if potentially difficult to see with the incorrect background).

Steps to Reproduce

  1. Create new Xamarin Forms app from Visual Studio template
  2. Update Xamarin Forms to 4.8
  3. Run app on iOS, with dark theme active

Expected Behavior

All in-box controls styled to match current theme (unless attribute explicitly set).

Actual Behavior

App background (not page, whose components have a transparent background) on iOS is always white, formatted text does not respond to style changes (already raised under #10929, so tangential to issue I'm raising here).

Basic Information

  • Version with issue: 4.8.0.1534
  • Last known good version: 4.6.0.1141 (4.7 untested)
  • IDE: Visual Studio16.7.5 with mobile development workload
  • Platform Target Frameworks:
    • iOS: 14.0
    • Android: 9.0
  • Nuget Packages:
    • Xamarin.Forms 4.8.0.1534
    • Xamarin.Essentials 1.5.3.2
  • Affected Devices: Observed on iPhone (iPhone 8 simulator with iOS 14)

Screenshots

Dark them active

image

Light theme active (after switching from dark without restarting app)

image

Light theme active (app restarted)

image

Dark theme (after switching from light without restarting app)

image

Reproduction Link

https://github.com/Silic0nS0ldier/DarkThemeIosBug

Workaround

Background can be set on the page, using bindings to respond to changes.

<?xml version="1.0" encoding="utf-8" ?>
<ContentPage
    xmlns="http://xamarin.com/schemas/2014/forms"
    xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"
    x:Class="WeedWise.MainPage"
    BackgroundColor="{AppThemeBinding Light=White, Dark=Black}"
>
    ...
</ContentPage>

No doubt other workarounds exist, perhaps one that would address all pages without having to modify their source.

@Silic0nS0ldier Silic0nS0ldier added s/unverified New report that has yet to be verified t/bug 🐛 labels Oct 8, 2020
@samhouts samhouts added this to New in Triage Oct 8, 2020
@jsuarezruiz jsuarezruiz moved this from New to Needs Estimate in Triage Oct 8, 2020
@jsuarezruiz jsuarezruiz removed the s/unverified New report that has yet to be verified label Oct 8, 2020
@jsuarezruiz jsuarezruiz self-assigned this Oct 8, 2020
@samhouts samhouts added the in-progress This issue has an associated pull request that may resolve it! label Nov 2, 2020
@samhouts samhouts added this to In Progress in vNext+1 (5.0.0) Nov 2, 2020
@PureWeen PureWeen added this to the 5.0.0 milestone Nov 5, 2020
@PureWeen PureWeen added the blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. label Nov 5, 2020
@rmarinho rmarinho removed this from Needs Estimate in Triage Dec 16, 2020
@PureWeen PureWeen added this to To do in v5.0.1 via automation Dec 30, 2020
@PureWeen PureWeen modified the milestones: 5.0.0, 5.0.1 Dec 30, 2020
@PureWeen PureWeen removed this from In Progress in vNext+1 (5.0.0) Dec 30, 2020
v5.0.1 automation moved this from To do to Done Feb 4, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
a/darkmode blocker Issue blocks next stable release. Prioritize fixing and reviewing this issue. in-progress This issue has an associated pull request that may resolve it! p/Android p/iOS 🍎 t/bug 🐛
Projects
Development

Successfully merging a pull request may close this issue.

4 participants