You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

79 lines
3.9 KiB

<Border x:Class="SparkClient.Views.BaseWindow.BaseControl"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:hc="https://handyorg.github.io/handycontrol"
mc:Ignorable="d"
Margin="10" CornerRadius="15"
>
<Grid ClipToBounds="True" Background="#c5cbe3">
<Grid.RowDefinitions>
<RowDefinition Height="Auto"></RowDefinition>
<RowDefinition Height="*"></RowDefinition>
</Grid.RowDefinitions>
<!-- 模拟顶部标题栏 -->
<Grid Grid.Row="0" Height="40" Margin="15 5">
<Grid.ColumnDefinitions>
<ColumnDefinition Width="*"/>
<ColumnDefinition Width="Auto"/>
<ColumnDefinition Width="Auto"/>
</Grid.ColumnDefinitions>
<!-- 标题内容 -->
<TextBlock Grid.Column="0" Text="{Binding WindowTitle}"
VerticalAlignment="Center" Foreground="#000"
FontWeight="Bold"
HorizontalAlignment="Left" FontSize="20" Margin="10 0 0 0"/>
<!-- 按钮1 -->
<!-- <Border Grid.Column="1" -->
<!-- Width="30" Height="30" -->
<!-- HorizontalAlignment="Right" VerticalAlignment="Center" -->
<!-- Background="Transparent" -->
<!-- MouseEnter="Border_Minimize_MouseEnter" -->
<!-- MouseLeave="Border_MouseLeave" -->
<!-- Visibility="{Binding ShowFunctionButton}"> -->
<!-- <hc:Interaction.Triggers> -->
<!-- <hc:EventTrigger> -->
<!-- <hc:EventToCommand Command="{Binding CloseWindow}"></hc:EventToCommand> -->
<!-- </hc:EventTrigger> -->
<!-- </hc:Interaction.Triggers> -->
<!-- <Viewbox Stretch="Uniform"> -->
<!-- <Path Data="{Binding FunctionButtonIcon}" -->
<!-- Fill="Azure" -->
<!-- Stroke="Azure" -->
<!-- StrokeThickness="1" -->
<!-- HorizontalAlignment="Center" -->
<!-- VerticalAlignment="Center" -->
<!-- Margin="20 0 0 0" -->
<!-- Width="30" /> -->
<!-- </Viewbox> -->
<!-- </Border> -->
<!-- 关闭按钮 -->
<Border Grid.Column="2"
Width="40" Height="30"
Margin=" 0 0 10 0"
HorizontalAlignment="Right" VerticalAlignment="Center"
Background="Transparent"
MouseEnter="Border_Close_MouseEnter"
MouseLeave="Border_MouseLeave"
>
<Button Background="Transparent" BorderBrush="Transparent" Command="{Binding CloseCommand}">
<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>
</Button>
</Border>
</Grid>
<Border Grid.Row="1" Grid.Column="0" Background="#ffffff" Padding="10" Margin="20 10" CornerRadius="15">
<ContentControl Name="ContentMain" Content="{Binding Content}" />
</Border>
</Grid>
</Border>