From 9d1660270272180cd71147d6ddd53d1382643d2e Mon Sep 17 00:00:00 2001
From: wenxiangchao <wenxiangchao@ihengxin.com.cn>
Date: 星期一, 02 十一月 2026 18:00:14 +0800
Subject: [PATCH] merge: 并入远程 Initial commit 作为历史根节点

---
 HMI.UI/Style/BaseWindow.xaml |   61 ++++++++++++++++++++++++++++++
 1 files changed, 61 insertions(+), 0 deletions(-)

diff --git a/HMI.UI/Style/BaseWindow.xaml b/HMI.UI/Style/BaseWindow.xaml
new file mode 100644
index 0000000..f4c2183
--- /dev/null
+++ b/HMI.UI/Style/BaseWindow.xaml
@@ -0,0 +1,61 @@
+锘�<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+                    xmlns:ui="clr-namespace:HMI.UI"
+                    x:Class="HMI.UI.BaseWindowTemplate">
+    <ResourceDictionary.MergedDictionaries>
+        <ResourceDictionary Source="/HMI.UI;component/Resources/Font/Font.xaml"/>
+        <ResourceDictionary Source="/HMI.UI;component/Style/WindowResources.xaml"/>
+    </ResourceDictionary.MergedDictionaries>
+
+    <Style TargetType="ui:BaseWindow" x:Key="BaseWindow">
+        <Setter Property="WindowChrome.WindowChrome">
+            <Setter.Value>
+                <WindowChrome CornerRadius="0" CaptionHeight="40" GlassFrameThickness="0"
+      UseAeroCaptionButtons="False" NonClientFrameEdges="None"  />
+            </Setter.Value>
+        </Setter>
+
+        <Setter Property="Template">
+            <Setter.Value>
+                <ControlTemplate TargetType="ui:BaseWindow">
+                    <Border BorderThickness="1" BorderBrush="Gray">
+                        <Grid x:Name="mainGrid" Background="#FFF">
+                            <Grid.RowDefinitions>
+                                <RowDefinition Height="40"/>
+                                <RowDefinition/>
+                            </Grid.RowDefinitions>
+
+                            <Grid Grid.Row="0" Background="{DynamicResource PrimaryColor}">
+                                <Grid.ColumnDefinitions>
+                                    <ColumnDefinition/>
+                                    <ColumnDefinition Width="Auto"/>
+                                </Grid.ColumnDefinitions>
+                                <StackPanel x:Name="LeftPanel" Orientation="Horizontal" Grid.Column="0">
+                                    <Border x:Name="TitlePanel">
+                                        <Label VerticalContentAlignment="Center" Foreground="#FFF" Content="{TemplateBinding Title}"/>
+                                    </Border>
+                                </StackPanel>
+                                <StackPanel x:Name="RightPanel" Grid.Column="1" Orientation="Horizontal" HorizontalAlignment="Right">
+                                    <Button Style="{StaticResource WindowButton}" Click="Min_Click">&#xe650;</Button>
+                                    <Button Style="{StaticResource WindowButton}" Click="Max_Click">&#xe602;</Button>
+                                    <Button Style="{StaticResource WindowCloseButton}" Click="Close_Click">&#xe609;</Button>
+                                </StackPanel>
+                            </Grid>
+                            <AdornerDecorator Grid.Row="1">
+                                <ContentPresenter  Content="{TemplateBinding Content}" ContentStringFormat="{TemplateBinding ContentStringFormat}"
+ContentTemplate="{TemplateBinding ContentTemplate}"  />
+                            </AdornerDecorator>
+                        </Grid>
+                    </Border>
+
+                    <ControlTemplate.Triggers>
+                        <Trigger Property="WindowState" Value="Maximized">
+                            <Setter TargetName="mainGrid" Property="Margin" Value="8,8,8,8"></Setter>
+                        </Trigger>
+                    </ControlTemplate.Triggers>
+                </ControlTemplate>
+            </Setter.Value>
+        </Setter>
+    </Style>
+
+</ResourceDictionary>
\ No newline at end of file

--
Gitblit v1.9.1