dotMorten / WinUIEx

WinUI Extensions
https://dotmorten.github.io/WinUIEx
MIT License
615 stars 40 forks source link

ElementTheme.Default not applied correctly on 1.8.0 (good with 1.7.0 and before) #72

Closed TRadigk closed 1 year ago

TRadigk commented 2 years ago

Hi DotMorten,

I really appreciate your nuget package, it makes many things around windows a lot easier.

Today I tried V 1.8.0 and found an issue with ElementTheme Binding on a grid, which is not applied on children correctly. Please see the following collage of 6 screenshots. Only change is the version of you package: grafik

from left to right you see theme "Light, Dark and Default" applied on the grid residing in the window.

Also I would like to use this issue to ask if you provide release notes somewhere? And I also would like to know if you were able to hide the "close" button on windows on any presenter type?

dotMorten commented 2 years ago

Could you provide a simple sample that reproduces this? The ElementTheme property on Grid is part of WinUI so likely not WinUIEx causing it

dotMorten commented 2 years ago

Release notes are in the nuget package (which nuget.org will show)

TRadigk commented 2 years ago

Well.. I couldn't exactly repro the issue, but you can use the sample to see that the theme "default" is applied correctly without WindowEx, but when using WinUIEx "default" doesn't change anything (I get a white window while windows is set to dark mode). Please let it in run with the debugger, since the actual set theme I've written to debug output. You only need to switch between Head and Head~1.

https://github.com/TRadigk/ThemeBugSample

Code to use Mica is taken from Winui3 gallery.

Bondarenko1990 commented 2 years ago

me too. ElementTheme.Default not applied correctly on 1.8.0 (good with 1.7.0 and before) @dotMorten how to change the theme in the dialog box? image

TRadigk commented 2 years ago

@Bondarenko1990 the dialog should inherit the theme from its XamlRoot. Be sure to set any theme on the highest layer, if your design allows it. Thus typically you would do this on the window. If your design does not allow this, you have the "RequestedTheme" Property on the dialog, which you can bind to Viewmodel property if you want.

Bondarenko1990 commented 2 years ago

@TRadigk thanks

dotMorten commented 1 year ago

Sorry this took so long. This has been fixed.