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

[iOS/Android] Setting Background to null will not update rendering (for example Label.Background = null after it was set to Yellow stays Yellow) #24725

Closed
spadapet opened this issue Sep 11, 2024 · 3 comments
Assignees
Labels
area-controls-label Label, Span partner/hot-reload-xaml Issues impacting XAML Hot Reload experiences partner/hot-reload-xaml-full-page-fixed Issues with XAML incremental hot reload that are fixed after a full page hot reload platform/android 🤖 platform/iOS 🍎 t/bug Something isn't working

Comments

@spadapet
Copy link
Contributor

Description

In iOS and Android, when Background was set to null, the platform element's Background was not changed at all (except for Layouts). This should apply to any elements, such as Labels.

Steps to Reproduce

  1. Open MAUI repo and solution that contains the Sandbox project in VS 2022 latest version:
    • image
  2. Set target to Android
  3. F5 to build and debug
  4. Open MainPage.xaml in the Sandbox project
  5. Type this Label:
    • <Label Text="Foo" Background="Yellow" />
  6. Notice that the app has the yellow label:
    • image
  7. Delete the Background property:
    • <Label Text="Foo" />

RESULT:
The Label is still Yellow in the app (XAML Hot Reload does remove the property value)

EXPECT:
Not Yellow anymore

Link to public reproduction project repository

https://github.com/dotnet/maui

Version with bug

9.0.0-rc.1.24453.9

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

iOS, Android

Affected platform versions

No response

Did you find any workaround?

You can set a Transparent background brush instead of null. But a fix is still needed for XAML Hot Reload to work properly.

Relevant log output

No response

@spadapet spadapet added t/bug Something isn't working partner/hot-reload-xaml Issues impacting XAML Hot Reload experiences partner/hot-reload-xaml-full-page-fixed Issues with XAML incremental hot reload that are fixed after a full page hot reload labels Sep 11, 2024
@spadapet spadapet self-assigned this Sep 11, 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.

@spadapet
Copy link
Contributor Author

Yeah, the AI bot found a dupe:
#22914

@mattleibow
Copy link
Member

Duplicate of #22914

@mattleibow mattleibow marked this as a duplicate of #22914 Sep 13, 2024
@mattleibow mattleibow closed this as not planned Won't fix, can't repro, duplicate, stale Sep 13, 2024
@github-actions github-actions bot locked and limited conversation to collaborators Oct 13, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-controls-label Label, Span partner/hot-reload-xaml Issues impacting XAML Hot Reload experiences partner/hot-reload-xaml-full-page-fixed Issues with XAML incremental hot reload that are fixed after a full page hot reload platform/android 🤖 platform/iOS 🍎 t/bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants