更新
This commit is contained in:
@@ -1,20 +1,38 @@
|
||||
<Window xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:FootwearTest.ViewModels"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="1280" d:DesignHeight="800"
|
||||
x:Class="FootwearTest.Views.MainWindow"
|
||||
x:DataType="vm:MainWindowViewModel"
|
||||
Icon="/Assets/avalonia-logo.ico"
|
||||
Width="1280"
|
||||
Height="800"
|
||||
MinWidth="1100"
|
||||
MinHeight="720"
|
||||
WindowState="Maximized"
|
||||
Title="整鞋热阻和湿阻测定仪"
|
||||
Background="#EEF2F5"
|
||||
TransparencyLevelHint="None">
|
||||
<suki:SukiWindow xmlns="https://github.com/avaloniaui"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:vm="using:FootwearTest.ViewModels"
|
||||
xmlns:suki="clr-namespace:SukiUI.Controls;assembly=SukiUI"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
mc:Ignorable="d" d:DesignWidth="1280" d:DesignHeight="800"
|
||||
x:Class="FootwearTest.Views.MainWindow"
|
||||
x:DataType="vm:MainWindowViewModel"
|
||||
Icon="/Assets/avalonia-logo.ico"
|
||||
Width="1280"
|
||||
Height="800"
|
||||
MinWidth="1100"
|
||||
MinHeight="720"
|
||||
WindowState="Maximized"
|
||||
Title="整鞋热阻和湿阻测定仪"
|
||||
Background="#EEF2F5"
|
||||
TransparencyLevelHint="None"
|
||||
BackgroundAnimationEnabled="False"
|
||||
BackgroundTransitionsEnabled="False"
|
||||
ShowTitlebarBackground="True"
|
||||
TitleBarAnimationEnabled="False"
|
||||
TitleBarVisibilityOnFullScreen="Visible">
|
||||
|
||||
<suki:SukiWindow.Styles>
|
||||
<Style Selector="suki|GlassCard#PART_TitleBarBackground">
|
||||
<Setter Property="IsOpaque" Value="True"/>
|
||||
</Style>
|
||||
<Style Selector="suki|GlassCard#PART_TitleBarBackground /template/ Border.GlassCardBorderPartCard">
|
||||
<Setter Property="Background" Value="#FDFEFF"/>
|
||||
</Style>
|
||||
<Style Selector="Border#DragArea">
|
||||
<Setter Property="Background" Value="#FDFEFF"/>
|
||||
</Style>
|
||||
</suki:SukiWindow.Styles>
|
||||
|
||||
<Grid Background="#EEF2F5" ColumnDefinitions="236,*">
|
||||
<Border Grid.Column="0" Background="#17212B">
|
||||
@@ -77,4 +95,4 @@
|
||||
</Grid>
|
||||
</Grid>
|
||||
|
||||
</Window>
|
||||
</suki:SukiWindow>
|
||||
|
||||
@@ -1,12 +1,34 @@
|
||||
using Avalonia.Controls;
|
||||
using Avalonia.Controls.Primitives;
|
||||
using Avalonia.Media;
|
||||
using SukiUI.Controls;
|
||||
|
||||
namespace FootwearTest.Views
|
||||
{
|
||||
public partial class MainWindow : Window
|
||||
public partial class MainWindow : SukiWindow
|
||||
{
|
||||
public MainWindow()
|
||||
{
|
||||
InitializeComponent();
|
||||
}
|
||||
|
||||
protected override void OnApplyTemplate(TemplateAppliedEventArgs e)
|
||||
{
|
||||
base.OnApplyTemplate(e);
|
||||
|
||||
var titleBarBackground = e.NameScope.Find<GlassCard>("PART_TitleBarBackground");
|
||||
if (titleBarBackground is not null)
|
||||
{
|
||||
titleBarBackground.IsOpaque = true;
|
||||
titleBarBackground.IsAnimated = false;
|
||||
titleBarBackground.BorderThickness = new Avalonia.Thickness(0);
|
||||
}
|
||||
|
||||
var dragArea = e.NameScope.Find<Border>("DragArea");
|
||||
if (dragArea is not null)
|
||||
{
|
||||
dragArea.Background = SolidColorBrush.Parse("#FDFEFF");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user