-
Notifications
You must be signed in to change notification settings - Fork 27
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
Using a style that uses the ResourceExtensions works only for the first element using it #1187
Comments
cc @kazo0 |
@ArchieCoder if you add the |
Adding BasedOn="{StaticResource DefaultButtonStyle}" works for net8.0, but it does not work for WinUI. |
this can be repro'd with:
which is exactly what we are doing here. |
@Xiaoy312 Thanks for the fast follow-up. Is this fix going to be in the next official release 5.3 only? I don't know mergify. I see backport, but I'm not sure what it means. |
I will let @agneszitte answer you. |
@ArchieCoder yep this will be in the next stable packages of Toolkit that will be part of the overall Uno 5.3 release |
@Xiaoy312 can you take a look at the new sample that @ArchieCoder provided, please (that uses Uno.Sdk 5.3.31 that normally includes the fixes for your previous PR #1190). Thanks in advance. |
@Kunal22shah I will let you take a look as @Xiaoy312 is busy with other tasks please |
Thanks @ArchieCoder for providing the zip file. I tested it with the latest |
@Kunal22shah Did you try with Skia Desktop? With 5.3.99 and 5.4.0-dev.220, in Skia the buttons are gray not blue. |
@ArchieCoder i ran the desktop WSL, it good for 5.3.99: |
@Kunal22shah I added more style files from my project and I'm able to repro the issue. Here is the new sample app: App1Updated.zip |
Thank you a lot @ArchieCoder for the sample, @Kunal22shah will be able to investigate. |
@ArchieCoder Thanks again, can you double check the app you shared, I don't see the buttons on WSL now: |
@Kunal22shah In WSL, I do not see the buttons as well. If you remove "Style="{StaticResource ActionButtonStyle}", you will see the buttons. The bug seems then worse in Linux. This is just a page with 2 buttons. |
@ArchieCoder So upon investigation, it seems like its a uno bug and i have created this issue for the samehttps://github.com/unoplatform/uno/issues/18132. For now i would suggest the follow workaround to you: For WinAppSDK : using latest toolkit version will fix it - |
@Kunal22shah for the time being I will use the old style (that's the best workaround), but let me know when the bug will be resolved and I will test it. Thanks. |
Since the original issue of the first element being the only one having the resources overridden I will close this issue. The other issue that was discovered is being tracked by: unoplatform/uno#18132 This one is a symptom of Uno's Generic.xaml have a different style than WinUI's Generic.xaml Uno's generic.xaml button style: https://github.com/unoplatform/uno/blob/4dabe7d629771d24e312a9da948f24241387b167/src/Uno.UI/UI/Xaml/Style/Generic/Generic.xaml#L2898 WinUI's generic.xaml button style: https://github.com/microsoft/microsoft-ui-xaml/blob/69097129a853c65a16447aade4c82576d4724b1a/src/dxaml/xcp/dxaml/themes/generic.xaml#L5984 You can see that the WinUI default implicit Button style is using the |
Current behavior
Expected behavior
Same blue background for both buttons
How to reproduce it (as minimally and precisely as possible)
UnoApp1.zip
The only difference is I don't use BasedOn in my Style
Workaround
No response
Works on UWP/WinUI
No
Environment
No response
NuGet package version(s)
No response
Affected platforms
No response
IDE
No response
IDE version
No response
Relevant plugins
No response
Anything else we need to know?
No response
The text was updated successfully, but these errors were encountered: