You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I define an implicit style for a Window in App.xaml.cs, this style will never get applied. You're forced to explicitly set the style on every single window instance.
Run the application and notice the Window doesn't have a red Background.
In MainWindow.xaml set the Window style explicitly by adding Style="{StaticResource DefaultWindowStyle}"
Notice the window now has a red background.
Expected behavior
Implicit styles should also be applied to Window instances.
Actual behavior
Implicit styles do not apply to Window instances.
Regression?
No response
Known Workarounds
No known workaround for implicit styles - only explicit styles work.
Impact
Harder to maintain consistent look and feel of windows, or to create styling libraries that doesn't require extra code on every single window instance.
Configuration
.NET 9.0.101
Windows 11 23H2, x64
Other information
No response
The text was updated successfully, but these errors were encountered:
That’s not quite true though. If you create a style for ButtonBase it is also applied to both Button and ToggleButton sub classes. Why is Window any different?
Description
If I define an implicit style for a Window in App.xaml.cs, this style will never get applied. You're forced to explicitly set the style on every single window instance.
Reproduction Steps
Style="{StaticResource DefaultWindowStyle}"
Expected behavior
Implicit styles should also be applied to Window instances.
Actual behavior
Implicit styles do not apply to Window instances.
Regression?
No response
Known Workarounds
No known workaround for implicit styles - only explicit styles work.
Impact
Harder to maintain consistent look and feel of windows, or to create styling libraries that doesn't require extra code on every single window instance.
Configuration
.NET 9.0.101
Windows 11 23H2, x64
Other information
No response
The text was updated successfully, but these errors were encountered: