Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3583,14 +3583,7 @@ private void Initialize()
// TODO : Remove when Fluent theme is enabled by default
if (ThemeManager.IsFluentThemeEnabled)
{
if(WindowBackdropManager.IsBackdropEnabled)
{
SetResourceReference(StyleProperty, typeof(Window));
}
else
{
SetResourceReference(StyleProperty, "BackdropDisabledWindowStyle");
}
SetResourceReference(StyleProperty, typeof(Window));
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<ResourceDictionary
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:framework="clr-namespace:MS.Internal;assembly=PresentationFramework"
xmlns:controls="clr-namespace:Fluent.Controls">

<ControlTemplate x:Key="WindowTemplateKey"
Expand Down Expand Up @@ -71,13 +72,15 @@
<Setter Property="Template"
Value="{StaticResource WindowTemplateKey}"/>
</Trigger>
<DataTrigger Binding="{Binding Path=(SystemParameters.HighContrast)}" Value="True">
<Setter Property="Background" Value="{DynamicResource WindowBackground}" />
</DataTrigger>
<DataTrigger Binding="{Binding Path=(framework:FrameworkAppContextSwitches.DisableFluentThemeWindowBackdrop)}" Value="True">
<Setter Property="Background" Value="{DynamicResource WindowBackground}" />
</DataTrigger>
</Style.Triggers>
</Style>

<Style x:Key="BackdropDisabledWindowStyle" BasedOn="{StaticResource DefaultWindowStyle}" TargetType="{x:Type Window}" >
<Setter Property="Background" Value="{DynamicResource WindowBackground}" />
</Style>

<Style BasedOn="{StaticResource DefaultWindowStyle}" TargetType="{x:Type Window}" />

</ResourceDictionary>