File tree Expand file tree Collapse file tree 2 files changed +8
-12
lines changed
src/Microsoft.DotNet.Wpf/src
PresentationFramework/System/Windows
Themes/PresentationFramework.Fluent/Styles Expand file tree Collapse file tree 2 files changed +8
-12
lines changed Original file line number Diff line number Diff line change @@ -3583,14 +3583,7 @@ private void Initialize()
35833583 // TODO : Remove when Fluent theme is enabled by default
35843584 if ( ThemeManager . IsFluentThemeEnabled )
35853585 {
3586- if ( WindowBackdropManager . IsBackdropEnabled )
3587- {
3588- SetResourceReference ( StyleProperty , typeof ( Window ) ) ;
3589- }
3590- else
3591- {
3592- SetResourceReference ( StyleProperty , "BackdropDisabledWindowStyle" ) ;
3593- }
3586+ SetResourceReference ( StyleProperty , typeof ( Window ) ) ;
35943587 }
35953588 }
35963589
Original file line number Diff line number Diff line change 88<ResourceDictionary
99 xmlns =" http://schemas.microsoft.com/winfx/2006/xaml/presentation"
1010 xmlns : x =" http://schemas.microsoft.com/winfx/2006/xaml"
11+ xmlns : framework =" clr-namespace:MS.Internal;assembly=PresentationFramework"
1112 xmlns : controls =" clr-namespace:Fluent.Controls" >
1213
1314 <ControlTemplate x : Key =" WindowTemplateKey"
7172 <Setter Property =" Template"
7273 Value =" {StaticResource WindowTemplateKey}" />
7374 </Trigger >
75+ <DataTrigger Binding =" {Binding Path=(SystemParameters.HighContrast)}" Value =" True" >
76+ <Setter Property =" Background" Value =" {DynamicResource WindowBackground}" />
77+ </DataTrigger >
78+ <DataTrigger Binding =" {Binding Path=(framework:FrameworkAppContextSwitches.DisableFluentThemeWindowBackdrop)}" Value =" True" >
79+ <Setter Property =" Background" Value =" {DynamicResource WindowBackground}" />
80+ </DataTrigger >
7481 </Style .Triggers>
7582 </Style >
7683
77- <Style x : Key =" BackdropDisabledWindowStyle" BasedOn =" {StaticResource DefaultWindowStyle}" TargetType =" {x:Type Window}" >
78- <Setter Property =" Background" Value =" {DynamicResource WindowBackground}" />
79- </Style >
80-
8184 <Style BasedOn =" {StaticResource DefaultWindowStyle}" TargetType =" {x:Type Window}" />
8285
8386</ResourceDictionary >
You can’t perform that action at this time.
0 commit comments