Skip to content

Button VisualStates do not work #19690

@polqnaP

Description

@polqnaP

Description

Setters are not unapplied when using custom VisualState on a Button on Android, iOS and MacCatalyst.

Steps to Reproduce

  1. Create a custom Button with custom VisualState.
  2. Override the ChangeVisualState method and go to the Custom state when clicking on the Button every other time, otherwise call base.ChangeVisualState().
  3. Add VisualStateGroups for the Button.
  4. Click on the Button - go to Custom VS.
  5. Click on the Button again - go to Normal VS.

Expected: When the Button is clicked the second time it should go to Normal state.

Actual: When the Button is clicked the second time it visually stays in Custom state.

Link to public reproduction project repository

https://github.com/telerik/ms-samples/tree/main/Maui/ButtonVisualStatesIssue

Version with bug

8.0.3

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, macOS

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, ImageButtonpartnerIssue or Request from a partner teampartner/syncfusionIssues / PR's with Syncfusion collaborationplatform/androidplatform/iosplatform/macosmacOS / Mac Catalysts/triagedIssue has been revieweds/verifiedVerified / Reproducible Issue ready for Engineering Triaget/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions