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

Removing the entire ContentPage.Resources element does not trigger the UI updates #11877

Closed
mattleibow opened this issue Dec 5, 2022 · 3 comments
Labels
area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging area-xaml XAML, CSS, Triggers, Behaviors partner/hot-reload-xaml Issues impacting XAML Hot Reload experiences platform/android 🤖 platform/windows 🪟 scenario-day t/bug Something isn't working
Milestone

Comments

@mattleibow
Copy link
Member

mattleibow commented Dec 5, 2022

Description

I am using XAML Hot Reload...

Using the default maui template, I can add/remove/change properties in resource dictionaries - and even remove the whole dictionary.

But, if I remove the entire <ContentPage.Resources> node, then the controls are not updated.

Steps to Reproduce

  1. File | New | Maui app
  2. Run
  3. Add this xaml
    <ContentPage.Resources>
        <ResourceDictionary>
            <Style TargetType="Button">
                <Setter Property="Background" Value="Red" />
            </Style>
        </ResourceDictionary>
    </ContentPage.Resources>
  4. Observe the button background is now red
  5. Change the value to "Blue"
  6. Observe the button is now blue
  7. Delete the <ResourceDictionary>
  8. Observe the button is now the default purple again
  9. Undo the change (add the <RD> back)
  10. Observe the button is blue/red agan
  11. Delete the entire <ContentPage.Resources> node
  12. Observe the color is not purple

Link to public reproduction project repository

File | New | Maui app and use the snippet

Version with bug

Unknown/Other (please specify)

Last version that worked well

Unknown/Other

Affected platforms

Windows, Android, I was not able test on other platforms

Affected platform versions

Tested on Windows 11

Did you find any workaround?

No response

Relevant log output

No response

@mattleibow mattleibow added t/bug Something isn't working area-xaml XAML, CSS, Triggers, Behaviors area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging partner/hot-reload-xaml Issues impacting XAML Hot Reload experiences scenario-day labels Dec 5, 2022
@mattleibow mattleibow added this to the Backlog milestone Dec 5, 2022
@ghost
Copy link

ghost commented Dec 5, 2022

We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process.

@jonathanpeppers
Copy link
Member

This is duplicate of: #11082

When you remove a <Setter Property="Background" Value="Red" />, then it doesn't know the original value of what Background should be.

@jonathanpeppers jonathanpeppers closed this as not planned Won't fix, can't repro, duplicate, stale Feb 7, 2023
@samhouts
Copy link
Member

samhouts commented Feb 9, 2023

Duplicate of #11082

@samhouts samhouts marked this as a duplicate of #11082 Feb 9, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Mar 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-tooling XAML & C# Hot Reload, XAML Editor, Live Visual Tree, Live Preview, Debugging area-xaml XAML, CSS, Triggers, Behaviors partner/hot-reload-xaml Issues impacting XAML Hot Reload experiences platform/android 🤖 platform/windows 🪟 scenario-day t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants