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

Setting a Foreground on a SplitButton does not apply to the dropdown half #7673

Closed
zadjii-msft opened this issue Aug 31, 2022 · 3 comments
Closed
Labels
bug Something isn't working team-Controls Issue for the Controls team

Comments

@zadjii-msft
Copy link
Member

re: microsoft/terminal#13871

See source:

<Button x:Name="SecondaryButton"
Grid.Column="2"
Foreground="{ThemeResource SplitButtonForegroundSecondary}"
Background="{TemplateBinding Background}"

We were setting Foreground on the SplitButton we use as our new tab button. However, the visual styles for the secondary button use Foreground="{ThemeResource SplitButtonForegroundSecondary}" , so they'll just always ignore the Foreground property (even if the primary button respects it).

Also, this seems to have regressed in #3887, which first shipped in 2.6.1

https://github.com/microsoft/microsoft-ui-xaml/blame/33732458ede38166f9127675898e4760c82b89bb/dev/SplitButton/SplitButton.xaml#L292

If this is by design, that's fine - but it should be documented as such.

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Aug 31, 2022
@bpulliam bpulliam added the team-Controls Issue for the Controls team label Oct 30, 2022
@bpulliam bpulliam removed the needs-triage Issue needs to be triaged by the area owners label Dec 7, 2022
@github-actions
Copy link

This issue is stale because it has been open 180 days with no activity. Remove stale label or comment or this will be closed in 5 days.

@zadjii-msft
Copy link
Member Author

Nothing has changed here ; still an issue.

@duncanmacmichael duncanmacmichael added the bug Something isn't working label Oct 24, 2023
@karkarl
Copy link
Contributor

karkarl commented Feb 8, 2024

Hey @zadjii-msft, this is by design, since SplitView's primary and secondary texts uses different brush colours. Templatebinding both elements to SplitView.Foreground will not allow them to consume different brushes, and ultimately remove flexibility in customization.

I agree much work should be done in terms of documentation since it's not immediately obvious what element Foreground (nor Background) sets. Happy to discuss further for ideas.

@karkarl karkarl closed this as not planned Won't fix, can't repro, duplicate, stale Feb 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working team-Controls Issue for the Controls team
Projects
None yet
Development

No branches or pull requests

4 participants