-
Notifications
You must be signed in to change notification settings - Fork 661
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 is drawed incorrectly when IsEnabled=false by default and then enabled back #9656
Comments
Another workaround is to refresh style on IsEnabledChanged event. I'm using custom split button style in my app and this code works fine as well. IsEnabledChanged="SplitButton_IsEnabledChanged" private void SplitButton_IsEnabledChanged(object sender, DependencyPropertyChangedEventArgs e) |
Hi I'm an AI powered bot that finds similar issues based off the issue title. Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you! Open similar issues:
Closed similar issues:
|
Describe the bug
If I set IsEnabled=false by default for SplitButton, then I enabled it e.g. by binding, the control is rendered wrong until I hover over the control. After the hover over the control, it is drawn correctly. (See attached pictures)
There is workaround but ofc it's not ideal. The workaround is to have IsEnabled = enable at the start and switch false to on loaded event. Then it looks like it works fine.
Steps to reproduce the bug
I attached an app sample but short the steps are following:
Enable split button
Expected behavior
The SplitButton should be rendered in the same way as it is when the SplitButton is enabled by default from the app start.
Screenshots
After start
![image](https://private-user-images.githubusercontent.com/6740126/330436785-340e3756-527e-45b8-9d26-256856888795.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzNTA4NjYsIm5iZiI6MTcxODM1MDU2NiwicGF0aCI6Ii82NzQwMTI2LzMzMDQzNjc4NS0zNDBlMzc1Ni01MjdlLTQ1YjgtOWQyNi0yNTY4NTY4ODg3OTUucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxNCUyRnVzLWVhc3QtMS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CizFv0VPDlON0-r9Owu4M3ERBJmAWvs0Y0)
![image](https://private-user-images.githubusercontent.com/6740126/330437123-c611e6b7-cdb1-4da0-acb6-23e42b15688d.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTgzNTA4NjYsIm5iZiI6MTcxODM1MDU2NiwicGF0aCI6Ii82NzQwMTI2LzMzMDQzNzEyMy1jNjExZTZiNy1jZGIxLTRkYTAtYWNiNi0yM2U0MmIxNTY4OGQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYxNCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MTRUMDczNjA2WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9OGFiNjVkOGEwZDU5NjZlMDc0ZDA5ZDhjOGVmNTA4YjdiNTVjYjFjOTkyNzg3NmI0OTA2OGFmZjgyYTZiYTRiOCZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.7AaBTd1Xqlr1SFkQdiZBKK1idkgqjvqCpQBlGEV7btU)
After enabling the SplitButton
After hovering over the control and put mouse control out of the control rectangle
NuGet package version
Windows App SDK 1.5.3: 1.5.240428000
Packaging type
Unpackaged
Windows version
Windows 10 version 22H2 (19045, 2022 Update)
IDE
Visual Studio 2022-preview
Additional context
No response
The text was updated successfully, but these errors were encountered: