Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] App based on FlyoutPage uses incorrect title bar colours when system is set to Dark theme and app set to Light theme - illegible content #23057

Closed
MitchBomcanhao opened this issue Jun 14, 2024 · 4 comments · Fixed by #23144
Assignees
Labels
area-controls-window Window fixed-in-8.0.70 fixed-in-9.0.0-preview.6.24327.7 migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Milestone

Comments

@MitchBomcanhao
Copy link

Description

When the windows app is set to Light theme, and the computer is set to Dark theme, the application window's buttons at the top are shown in white against a white background while the app window has focus. If focus is moved away from the app, the button icons change color and become visible.

This fails on maui from the first v8 up to SR6. I've not been able to try older versions of maui. This works fine on xamarin forms.

Steps to Reproduce

  1. Create a new maui base project.
  2. in App.xaml.cs, replace MainPage = new AppShell(); with MainPage = new MainPage();
  3. Change MainPage to be a FlyoutPage - it doesn't matter what content you put in FlyoutPage.Flyout or FlyoutPage.Detail.
  4. in the Windows platform app.xaml.cs file, add this line to the Aop class constructor: RequestedTheme = ApplicationTheme.Light;
  5. Set windows to dark theme.
  6. Run the app
  7. EXPECTED
  8. The app's window title bar and its buttons are correctly rendered
  9. OBSERVED
  10. The title bar is shown in white and the various buttons' icons are also shown in white, making them impossible to see.
  11. image
  12. Click away from the app window. OBSERVE
  13. the button icons will now become visible:
  14. image
  15. Change windows to light theme. OBSERVE
  16. now the buttons are correctly visible when the app is focused (pictured below) and unfocused
  17. image

Link to public reproduction project repository

No response

Version with bug

8.0.3 GA

Is this a regression from previous behavior?

Yes, this used to work in Xamarin.Forms

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

Reproduced in Windows 11 22631.3737

Did you find any workaround?

No response

Relevant log output

No response

@MitchBomcanhao MitchBomcanhao added the t/bug Something isn't working label Jun 14, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@MitchBomcanhao
Copy link
Author

It is also possible that the application name is missing from the top left of the application window...

@PureWeen PureWeen added this to the .NET 8 SR8 milestone Jun 14, 2024
@samhouts samhouts added platform/windows 🪟 migration-compatibiity migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert and removed migration-compatibiity labels Jun 17, 2024
@ninachen03 ninachen03 added s/verified Verified / Reproducible Issue ready for Engineering Triage s/triaged Issue has been reviewed labels Jun 18, 2024
@ninachen03
Copy link

ninachen03 commented Jun 18, 2024

Verified this original issue with Visual Studio 17.11.0 Preview 2.0 (8.0.60 & 8.0.3 ). Can repro it.
MauiApp4.zip

PureWeen added a commit that referenced this issue Jun 20, 2024
)

### Description of Change

Ensure titlebar button foreground colors use app theme vs Windows theme

### Issues Fixed

Fixes #23057
@github-project-automation github-project-automation bot moved this from Todo to Done in MAUI SDK Ongoing Jun 20, 2024
@PureWeen PureWeen modified the milestones: .NET 8 SR8, .NET 8 SR7 Jul 3, 2024
@MitchBomcanhao
Copy link
Author

It is also possible that the application name is missing from the top left of the application window...

@Foda @PureWeen buttons are visible but the application title is indeed still missing after this new release

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-window Window fixed-in-8.0.70 fixed-in-9.0.0-preview.6.24327.7 migration-compatibility Xamarin.Forms to .NET MAUI Migration, Upgrade Assistant, Try-Convert platform/windows 🪟 s/triaged Issue has been reviewed s/verified Verified / Reproducible Issue ready for Engineering Triage t/bug Something isn't working
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

5 participants