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.
75 lines
3.5 KiB
75 lines
3.5 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"> |
|
<Grid.RowDefinitions> |
|
<RowDefinition Height="Auto"></RowDefinition> |
|
<RowDefinition Height="*"></RowDefinition> |
|
</Grid.RowDefinitions> |
|
<!-- 模拟顶部标题栏 --> |
|
<Grid Grid.Row="0" Background="#795C2A" Height="40"> |
|
<Grid.ColumnDefinitions> |
|
<ColumnDefinition Width="*"/> |
|
<ColumnDefinition Width="Auto"/> |
|
<ColumnDefinition Width="Auto"/> |
|
</Grid.ColumnDefinitions> |
|
<!-- 标题内容 --> |
|
<TextBlock Grid.Column="0" Text="{Binding WindowTitle}" |
|
VerticalAlignment="Center" Foreground="Azure" |
|
HorizontalAlignment="Left" FontSize="16" 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> |
|
<ContentControl Grid.Row="1" Grid.Column="0" Name="ContentMain" Content="{Binding Content}"/> |
|
</Grid> |
|
</Border>
|
|
|