Skip to content

[regression/8.0.0] Button background does not override implicit visualstate style #18103

Description

@Zack-G-I-T

Description

If you create an implicit style with VisualStateGroups, they are no longer overriden in Net 8.
In the sample repo i created an implicit style for all buttons that sets the background to green when visualState is Normal.
I then add a button and override the background to be orange.

In Net7 the button appears orange - this is expected.
In Net8 the button stays green meaning I can no longer override the background color.

Steps to Reproduce

  1. Download repo
  2. Run on both net7 and net8 and see the difference - in Net7 it is orange, but in Net8 it is green.

Link to public reproduction project repository

https://github.com/Zack-G-I-T/ImplicitStyleIssue

Version with bug

8.0.0-rc.2.9373

Is this a regression from previous behavior?

Yes, this used to work in .NET MAUI

Last version that worked well

7.0.96

Affected platforms

Android

Affected platform versions

No response

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-controls-buttonButton, ImageButtonarea-xamlXAML, CSS, Triggers, Behaviorsfixed-in-8.0.6Look for this fix in 8.0.6 SR1!i/regressionThis issue described a confirmed regression on a currently supported versionplatform/androids/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions