150 lines
6.9 KiB
150 lines
6.9 KiB
<hc:Window x:Class="SparkClient.MainWindow" |
|
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" |
|
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" |
|
xmlns:d="http://schemas.microsoft.com/expression/blend/2008" |
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" |
|
xmlns:hc="https://handyorg.github.io/handycontrol" |
|
xmlns:baseWindow="clr-namespace:SparkClient.ViewModel.BaseWindow" |
|
mc:Ignorable="d" |
|
Title="{DynamicResource ProcName}" |
|
ShowTitle="False" |
|
WindowStyle="None" |
|
ResizeMode="CanResizeWithGrip" |
|
WindowStartupLocation="CenterScreen" |
|
d:DesignHeight="800" |
|
d:DesignWidth="1400" |
|
MinHeight="400" |
|
MinWidth="800" |
|
WindowState="Maximized" |
|
Loaded="MainWindow_OnLoaded" |
|
Background="{DynamicResource SecondaryRegionBrush}"> |
|
|
|
<!-- ~1~ 自定义标题栏 @1@ --> |
|
<!-- <hc:Window.NonClientAreaContent> --> |
|
<!-- <Grid Height="50" Background="Aqua"> --> |
|
<!-- <Grid.ColumnDefinitions> --> |
|
<!-- <ColumnDefinition Width="Auto" /> --> |
|
<!-- <ColumnDefinition Width="Auto" /> --> |
|
<!-- <ColumnDefinition Width="*" /> --> |
|
<!-- </Grid.ColumnDefinitions> --> |
|
<!-- --> |
|
<!-- ~1~ 图标 @1@ --> |
|
<!-- <Image Source="Resource/Image/MenuIcon/app.png" --> |
|
<!-- Width="40" Height="40" --> |
|
<!-- VerticalAlignment="Center" HorizontalAlignment="Center" Margin="10 0 10 0" /> --> |
|
<!-- --> |
|
<!-- ~1~ 窗口标题 @1@ --> |
|
<!-- <TextBlock Grid.Column="1" Text="{DynamicResource ProcName}" --> |
|
<!-- VerticalAlignment="Center" Foreground="Azure" --> |
|
<!-- HorizontalAlignment="Left" FontSize="16" /> --> |
|
<!-- </Grid> --> |
|
<!-- </hc:Window.NonClientAreaContent> --> |
|
|
|
<!-- 自定义标题栏背景 --> |
|
<!-- <hc:Window.NonClientAreaBackground> --> |
|
<!-- <LinearGradientBrush StartPoint="0,0" EndPoint="1,0"> --> |
|
<!-- <GradientStop Color="#5b3615" Offset="0" /> --> |
|
<!-- <GradientStop Color="#996a40" Offset="0.5" /> --> |
|
<!-- <GradientStop Color="#5b3615" Offset="1" /> --> |
|
<!-- </LinearGradientBrush> --> |
|
<!-- </hc:Window.NonClientAreaBackground> --> |
|
|
|
<!-- 内容区域 --> |
|
<Grid Background="Aqua"> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="80"></RowDefinition> |
|
<RowDefinition Height="*"></RowDefinition> |
|
</Grid.RowDefinitions> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
|
|
<Grid Grid.Row="0" Height="80" VerticalAlignment="Top"> |
|
<!-- 渐变背景 --> |
|
<Grid.Background> |
|
<LinearGradientBrush StartPoint="0,0" EndPoint="1,0"> |
|
<GradientStop Color="#5b3615" Offset="0" /> |
|
<GradientStop Color="#996a40" Offset="0.5" /> |
|
<GradientStop Color="#5b3615" Offset="1" /> |
|
</LinearGradientBrush> |
|
</Grid.Background> |
|
<!-- 顶部布局 --> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="Auto" /> |
|
<ColumnDefinition Width="Auto" /> |
|
<ColumnDefinition Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
|
|
<!-- 首位元素:图标 --> |
|
<Image Grid.Column="0" Source="Resource/Images/IGILogo.png" |
|
Width="70" Height="70" |
|
VerticalAlignment="Center" HorizontalAlignment="Center" Margin="20 0 20 0" /> |
|
|
|
<!-- 次位元素:标题 --> |
|
<TextBlock Grid.Column="1" Text="{StaticResource ResourceKey=ProcName}" |
|
VerticalAlignment="Center" Foreground="Azure" |
|
HorizontalAlignment="Left" FontSize="32" /> |
|
<!-- 末位元素:操作按钮 --> |
|
<Grid Grid.Column="2" Width="260" HorizontalAlignment="Right"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition Width="*" /> |
|
<ColumnDefinition Width="*" /> |
|
</Grid.ColumnDefinitions> |
|
|
|
<!-- 中文 --> |
|
<TextBlock Grid.Column="0" HorizontalAlignment="Center" VerticalAlignment="Center" |
|
Text="中" Foreground="Azure" FontSize="24"/> |
|
<!-- 英文 --> |
|
<TextBlock Grid.Column="1" HorizontalAlignment="Center" VerticalAlignment="Center" |
|
Text="EN" Foreground="Azure" FontSize="24"/> |
|
|
|
<!-- 最小化 --> |
|
<Border Grid.Column="2" |
|
Width="50" Height="70" |
|
HorizontalAlignment="Center" VerticalAlignment="Center" |
|
Background="Transparent" |
|
MouseEnter="Border_Minimize_MouseEnter" |
|
MouseLeave="Border_MouseLeave" |
|
MouseLeftButtonDown="Minimize_Click"> |
|
<Viewbox Stretch="Uniform"> |
|
<Path Data="{StaticResource WindowMinGeometry}" |
|
Fill="Azure" |
|
Stroke="Azure" |
|
StrokeThickness="1" |
|
HorizontalAlignment="Center" |
|
VerticalAlignment="Center" |
|
Margin="20 0 0 0" |
|
Width="30" /> |
|
</Viewbox> |
|
</Border> |
|
|
|
<!-- 关闭 --> |
|
<Border Grid.Column="3" |
|
Width="50" Height="70" |
|
HorizontalAlignment="Center" VerticalAlignment="Center" |
|
Background="Transparent" |
|
MouseEnter="Border_Close_MouseEnter" |
|
MouseLeave="Border_MouseLeave" |
|
MouseLeftButtonDown="Close_Click"> |
|
<Viewbox Stretch="Uniform"> |
|
<Path Data="{StaticResource CloseGeometry}" |
|
Fill="Azure" |
|
Stroke="Azure" |
|
StrokeThickness="1" |
|
HorizontalAlignment="Center" |
|
VerticalAlignment="Center" |
|
Margin="20 0 0 0" |
|
Width="30" /> |
|
</Viewbox> |
|
</Border> |
|
|
|
</Grid> |
|
</Grid> |
|
|
|
<!-- 窗口主体内容 --> |
|
<ContentControl Grid.Row="1" Grid.Column="0" Content="{Binding CurrentViewModel}"/> |
|
</Grid> |
|
|
|
</hc:Window>
|
|
|