Skip to content

Navigation breaks VisualState styles for Picker. #28536

@lendres

Description

@lendres

Description

After navigation, visual states on a Picker seem to break. This is for the selection box. The Title visual states function correctly.

Steps to Reproduce

  1. Clone and compile the repository specified below (please use the with-navigation branch).
  2. Run the app and note the appearance of the controls.
    Image
  3. Toggle the switch to On
    Image
  4. Perform the navigation using the buttons: Navigate to Second Page->Go Back
  5. Toggle the switch to Off. Observe that the styles on the Picker selection box do not match those from step 2 (next to yellow arrows in the image below).
    Image

Expected results: The styles match before and after navigation.

Note: It seems that the switch needs to be enabled (On) during navigation for this error to be produced.

Link to public reproduction project repository

https://github.com/lendres/MauiPickerVisualStates

Version with bug

9.0.50 SR5

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

No response

Affected platforms

Windows

Affected platform versions

Windows 10.0.19041.0

Did you find any workaround?

None is known.

Relevant log output

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions