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 Background color not updating when IsEnabled is false #6011

Closed
1 of 2 tasks
capegreg opened this issue Oct 1, 2021 · 8 comments · Fixed by #6138
Closed
1 of 2 tasks

SplitButton Background color not updating when IsEnabled is false #6011

capegreg opened this issue Oct 1, 2021 · 8 comments · Fixed by #6138
Labels
area-SplitButton help wanted Issue ideal for external contributors team-Controls Issue for the Controls team

Comments

@capegreg
Copy link

capegreg commented Oct 1, 2021

Describe the bug

The SplitButton Background color does not update to disabled color as a standard Button background color will change when the button IsEnabled is false.

Steps to reproduce the bug

Add the xmlns:muxc="using:Microsoft.UI.Xaml.Controls" namespace to a XAML page.

Add a SplitButton to XAML page

<muxc:SplitButton Background="#FFEAEAE0" Content="I am a SplitButton" Foreground="Black" IsEnabled="False" Height="48" Width="177" />

Add a Button to XAML page

View the page in designer window or run the application.

Expected behavior

The SplitButton background color should be the same as the Button background color since IsEnabled for both are "False".

Screenshots

splitbutton-button

NuGet package version

No response

Windows app type

  • UWP
  • Win32

Device form factor

Desktop

Windows version

May 2020 Update (19041)

Additional context

No response

@ghost ghost added the needs-triage Issue needs to be triaged by the area owners label Oct 1, 2021
@StephenLPeters StephenLPeters added area-SplitButton team-Controls Issue for the Controls team help wanted Issue ideal for external contributors labels Oct 20, 2021
@StephenLPeters
Copy link
Contributor

We have SplitButtonDisabledBackground resources, but they are simply not used. The control doesn't have a disabled state that could use them at all...

@marcelwgn
Copy link
Contributor

@StephenLPeters Is it correct to add the appropriate visual state then and set that resource? Mind if I work on that then?

@capegreg
Copy link
Author

Update. I added the following resource to get disabled style.

Background="{ThemeResource ButtonBackgroundDisabled}"
BorderBrush="{ThemeResource ButtonBorderBrushDisabled}"

@StephenLPeters
Copy link
Contributor

@chingucoding I think so, we will want to test it pretty thoroughly though, the state manager seems complicated to me...

@ghost
Copy link

ghost commented Apr 14, 2022

🎉This issue was addressed in #6138, which has now been successfully released as Microsoft.UI.Xaml v2.8.0-prerelease.220413001.:tada:

Handy links:

@ghost
Copy link

ghost commented Jul 13, 2022

🎉This issue was addressed in #6138, which has now been successfully released as Microsoft.UI.Xaml v2.8.0-prerelease.220712001.:tada:

Handy links:

@ghost
Copy link

ghost commented Jul 18, 2022

🎉This issue was addressed in #6138, which has now been successfully released as Microsoft.UI.Xaml v2.8.0.:tada:

Handy links:

@ghost
Copy link

ghost commented Jan 3, 2023

🎉This issue was addressed in #6138, which has now been successfully released as Microsoft.UI.Xaml v2.8.2.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-SplitButton help wanted Issue ideal for external contributors team-Controls Issue for the Controls team
Projects
None yet
3 participants