整理控件库
This commit is contained in:
@@ -117,7 +117,7 @@ public class FluentWindow : System.Windows.Window
|
||||
/// </summary>
|
||||
protected virtual void OnBackdropTypeChanged(WindowBackdropType oldValue, WindowBackdropType newValue)
|
||||
{
|
||||
if (Appearance.ApplicationThemeManager.GetAppTheme() == Appearance.ApplicationTheme.Unknown)
|
||||
if (Appearance.ThemeManager.GetAppTheme() == Appearance.ThemeType.Unknow)
|
||||
{
|
||||
newValue = WindowBackdropType.None;
|
||||
}
|
||||
@@ -137,8 +137,6 @@ public class FluentWindow : System.Windows.Window
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
//UnsafeNativeMethods.ApplyWindowCornerPreference(InteropHelper.Handle, newValue);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -159,10 +157,6 @@ public class FluentWindow : System.Windows.Window
|
||||
ResizeBorderThickness = ResizeMode == ResizeMode.NoResize ? default : new Thickness(4),
|
||||
UseAeroCaptionButtons = false,
|
||||
});
|
||||
|
||||
// WindowStyleProperty.OverrideMetadata(typeof(FluentWindow), new FrameworkPropertyMetadata(WindowStyle.SingleBorderWindow));
|
||||
// AllowsTransparencyProperty.OverrideMetadata(typeof(FluentWindow), new FrameworkPropertyMetadata(false));
|
||||
//_ = UnsafeNativeMethods.RemoveWindowTitlebarContents(this);
|
||||
}
|
||||
|
||||
/// <inheritdoc/>
|
||||
|
||||
@@ -1,50 +1,45 @@
|
||||
<!--
|
||||
This Source Code Form is subject to the terms of the MIT License.
|
||||
If a copy of the MIT was not distributed with this file, You can obtain one at https://opensource.org/licenses/MIT.
|
||||
Copyright (C) Leszek Pomianowski and WPF UI Contributors.
|
||||
All Rights Reserved.
|
||||
-->
|
||||
|
||||
<ResourceDictionary
|
||||
<ResourceDictionary
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:controls="clr-namespace:WPFluent.Controls">
|
||||
|
||||
<Style
|
||||
x:Key="DefaultFluentWindowStyle"
|
||||
BasedOn="{StaticResource {x:Type Window}}"
|
||||
TargetType="{x:Type controls:FluentWindow}">
|
||||
<Style TargetType="{x:Type controls:FluentWindow}">
|
||||
<Setter Property="Background" Value="{DynamicResource WindowBackground}" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource WindowForeground}" />
|
||||
<Setter Property="BorderBrush" Value="Transparent" />
|
||||
<Setter Property="BorderThickness" Value="0" />
|
||||
<Setter Property="Height" Value="600" />
|
||||
<Setter Property="MinHeight" Value="320" />
|
||||
<Setter Property="Width" Value="1100" />
|
||||
<Setter Property="MinWidth" Value="460" />
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="BorderBrush" Value="{DynamicResource ClientBorderBrush}" />
|
||||
<Setter Property="BorderThickness" Value="1" />
|
||||
<Setter Property="FontSize" Value="{DynamicResource ControlContentThemeFontSize}" />
|
||||
<Setter Property="FontWeight" Value="Normal" />
|
||||
<Setter Property="UseLayoutRounding" Value="True" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="Foreground" Value="{DynamicResource WindowForeground}" />
|
||||
<Setter Property="Height" Value="600" />
|
||||
<Setter Property="Margin" Value="0" />
|
||||
<Setter Property="MinHeight" Value="320" />
|
||||
<Setter Property="MinWidth" Value="460" />
|
||||
<Setter Property="OverridesDefaultStyle" Value="True" />
|
||||
<Setter Property="Padding" Value="0" />
|
||||
<Setter Property="SnapsToDevicePixels" Value="True" />
|
||||
<Setter Property="Template">
|
||||
<Setter.Value>
|
||||
<ControlTemplate TargetType="{x:Type Window}">
|
||||
<AdornerDecorator>
|
||||
<ControlTemplate TargetType="{x:Type controls:FluentWindow}">
|
||||
<!--<AdornerDecorator>
|
||||
<controls:ClientAreaBorder
|
||||
Background="{TemplateBinding Background}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<ContentPresenter x:Name="ContentPresenter" />
|
||||
<ContentPresenter x:Name="ContentPresenter" TextElement.Foreground="{TemplateBinding Background}"/>
|
||||
</controls:ClientAreaBorder>
|
||||
</AdornerDecorator>-->
|
||||
<AdornerDecorator>
|
||||
<controls:ClientAreaBorder
|
||||
Background="{DynamicResource WindowBackground}"
|
||||
BorderBrush="{TemplateBinding BorderBrush}"
|
||||
BorderThickness="{TemplateBinding BorderThickness}">
|
||||
<ContentPresenter x:Name="ContentPresenter" TextElement.Foreground="{TemplateBinding Foreground}" />
|
||||
</controls:ClientAreaBorder>
|
||||
</AdornerDecorator>
|
||||
</ControlTemplate>
|
||||
</Setter.Value>
|
||||
</Setter>
|
||||
<Setter Property="UseLayoutRounding" Value="True" />
|
||||
<Setter Property="Width" Value="1100" />
|
||||
</Style>
|
||||
|
||||
<Style BasedOn="{StaticResource DefaultFluentWindowStyle}" TargetType="{x:Type controls:FluentWindow}" />
|
||||
|
||||
</ResourceDictionary>
|
||||
</ResourceDictionary>
|
||||
Reference in New Issue
Block a user