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

[SplitButton] Add missing SplitButton disabled state and resource bindings #6138

Merged

Conversation

marcelwgn
Copy link
Collaborator

@marcelwgn marcelwgn commented Oct 21, 2021

Description

The disabled visualstate was missing on SplitButton, this is fixed now. The UpdateVisualState function now also takes the IsEnabled property into account and skips other states if the control is disabled. In addition to that, the disabled background and disabled border brushes are now being respected.

Motivation and Context

Closes #6011

How Has This Been Tested?

Tested manually.

Screenshots (if appropriate):

Screenshot of disabled Splitbutton next to disabled Button in dark theme

Screenshot of disabled Splitbutton next to disabled Button in light theme

Screenshot of disabled SplitButton next to disabled Button in high contrast theme

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Oct 21, 2021
@marcelwgn
Copy link
Collaborator Author

Also, I noticed that the disabled SplitButton does not have the same background color as a disabled Button assuming that SplitButtonBackgroundDisabled is the correct brush for that. Is that intentional?

@StephenLPeters
Copy link
Contributor

@tashatitova and @marksfoster and @chigy the split button previously did not have a disable state so the SplitButtonBackgroundDisabled brush wasn't being used. I don't think its been updated and needs to be updated to match the ButtonBackgroundDisabled value. Do you agree?

@StephenLPeters StephenLPeters added area-SplitButton team-Controls Issue for the Controls team and removed needs-triage Issue needs to be triaged by the area owners labels Oct 25, 2021
@chigy
Copy link
Member

chigy commented Oct 25, 2021

@StephenLPeters , @tashatitova and @marksfoster , I would imagine it will take the same color as the disabled button here so if it is not the same color today, I'd imagine it would need to be updated.

@StephenLPeters
Copy link
Contributor

@chingucoding could you make that update as a part of this change? :)

@tashatitova
Copy link
Contributor

@StephenLPeters @chigy agreed on disabled color

@marcelwgn
Copy link
Collaborator Author

Aaannndddd done @StephenLPeters! SplitButton is quite strange in how some parts need to be transparent since otherwise multiple partially opaque brushes would result in a view different to the desired result.

@StephenLPeters
Copy link
Contributor

yeah, it has a strange, and probably incorrect architecture

@StephenLPeters
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@StephenLPeters
Copy link
Contributor

@chingucoding can you update the before and after screenshots? Can we see the high contrast as well?

@marcelwgn
Copy link
Collaborator Author

Updated the screenshots now, SplitButton definitely could use some template refactoring, adding those brushes was definitely harder than one might think @StephenLPeters .

@StephenLPeters
Copy link
Contributor

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@StephenLPeters StephenLPeters merged commit 3373245 into microsoft:main Oct 26, 2021
@ghost
Copy link

ghost commented Apr 14, 2022

🎉Microsoft.UI.Xaml v2.8.0-prerelease.220413001 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Jul 13, 2022

🎉Microsoft.UI.Xaml v2.8.0-prerelease.220712001 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Jul 18, 2022

🎉Microsoft.UI.Xaml v2.8.0 has been released which incorporates this pull request.:tada:

Handy links:

@ghost
Copy link

ghost commented Jan 3, 2023

🎉Microsoft.UI.Xaml v2.8.2 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-SplitButton team-Controls Issue for the Controls team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SplitButton Background color not updating when IsEnabled is false
4 participants