WinUIEx icon indicating copy to clipboard operation
WinUIEx copied to clipboard

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

Open TRadigk opened this issue 3 years ago • 6 comments

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?

TRadigk avatar Aug 06 '22 14:08 TRadigk

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 avatar Aug 06 '22 14:08 dotMorten

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

dotMorten avatar Aug 06 '22 14:08 dotMorten

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.

TRadigk avatar Aug 06 '22 14:08 TRadigk

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

Bondarenko1990 avatar Aug 17 '22 06:08 Bondarenko1990

@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.

TRadigk avatar Aug 26 '22 18:08 TRadigk

@TRadigk thanks

Bondarenko1990 avatar Aug 28 '22 11:08 Bondarenko1990

Sorry this took so long. This has been fixed.

dotMorten avatar Apr 13 '23 04:04 dotMorten