更新
This commit is contained in:
@@ -1,20 +1,38 @@
|
|||||||
<Window xmlns="https://github.com/avaloniaui"
|
<suki:SukiWindow xmlns="https://github.com/avaloniaui"
|
||||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||||
xmlns:vm="using:FootwearTest.ViewModels"
|
xmlns:vm="using:FootwearTest.ViewModels"
|
||||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
xmlns:suki="clr-namespace:SukiUI.Controls;assembly=SukiUI"
|
||||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||||
mc:Ignorable="d" d:DesignWidth="1280" d:DesignHeight="800"
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||||
x:Class="FootwearTest.Views.MainWindow"
|
mc:Ignorable="d" d:DesignWidth="1280" d:DesignHeight="800"
|
||||||
x:DataType="vm:MainWindowViewModel"
|
x:Class="FootwearTest.Views.MainWindow"
|
||||||
Icon="/Assets/avalonia-logo.ico"
|
x:DataType="vm:MainWindowViewModel"
|
||||||
Width="1280"
|
Icon="/Assets/avalonia-logo.ico"
|
||||||
Height="800"
|
Width="1280"
|
||||||
MinWidth="1100"
|
Height="800"
|
||||||
MinHeight="720"
|
MinWidth="1100"
|
||||||
WindowState="Maximized"
|
MinHeight="720"
|
||||||
Title="整鞋热阻和湿阻测定仪"
|
WindowState="Maximized"
|
||||||
Background="#EEF2F5"
|
Title="整鞋热阻和湿阻测定仪"
|
||||||
TransparencyLevelHint="None">
|
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,*">
|
<Grid Background="#EEF2F5" ColumnDefinitions="236,*">
|
||||||
<Border Grid.Column="0" Background="#17212B">
|
<Border Grid.Column="0" Background="#17212B">
|
||||||
@@ -77,4 +95,4 @@
|
|||||||
</Grid>
|
</Grid>
|
||||||
</Grid>
|
</Grid>
|
||||||
|
|
||||||
</Window>
|
</suki:SukiWindow>
|
||||||
|
|||||||
@@ -1,12 +1,34 @@
|
|||||||
using Avalonia.Controls;
|
using Avalonia.Controls;
|
||||||
|
using Avalonia.Controls.Primitives;
|
||||||
|
using Avalonia.Media;
|
||||||
|
using SukiUI.Controls;
|
||||||
|
|
||||||
namespace FootwearTest.Views
|
namespace FootwearTest.Views
|
||||||
{
|
{
|
||||||
public partial class MainWindow : Window
|
public partial class MainWindow : SukiWindow
|
||||||
{
|
{
|
||||||
public MainWindow()
|
public MainWindow()
|
||||||
{
|
{
|
||||||
InitializeComponent();
|
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