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

Icons of multiple picker fields get the same accent color when selected #733

Open
fryndorfer opened this issue Aug 7, 2024 · 3 comments
Labels
bug-report Potential bug that should be verified input-field-group
Milestone

Comments

@fryndorfer
Copy link

If you add multiple picker fields with icons to your page and then select one of them, every icon from every picker field is colored and not just the one you selected.

image

The yellow color is set in my styles.xaml as the accent color. Notice how both icons are colored yellow, while the border color changes of only the selected picker. In this screenshot, I selected the "Type" picker as indicated by the yellow border color.

Styles.xaml:
image

@enisn enisn added bug-report Potential bug that should be verified input-field-group labels Aug 7, 2024
@enisn enisn added this to the v2.9 milestone Aug 7, 2024
@enisn
Copy link
Owner

enisn commented Aug 7, 2024

Can you try using CanCascade="True" and BasedOn="{StaticResource InputFieldBaseStyle}" for your style?

<Style TargetType="material:PickerField" CanCascade="True" BasedOn="{StaticResource InputFieldBaseStyle}">
    <!-- ... -->
</Style>

Visual States are defined in InputField style and they're commonly used across all the InpuFields including PickerField. When you inherit your new style from InputFieldBaseStyle, the problem probably will be solved.

@enisn
Copy link
Owner

enisn commented Aug 7, 2024

for more information:

Addressed in #630 and completed in #634

@fryndorfer
Copy link
Author

Can you try using CanCascade="True" and BasedOn="{StaticResource InputFieldBaseStyle}" for your style?

That leads to a crash. I also tried using BaseResourceKey="InputFieldBaseStyle", then the app was able to run, but the problem with the colored icons did not go away.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug-report Potential bug that should be verified input-field-group
Projects
None yet
Development

No branches or pull requests

2 participants