38 lines
1.4 KiB
XML
38 lines
1.4 KiB
XML
<UserControl
|
|
x:Class="DI_Electrical.Views.customWindowTitleBar"
|
|
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:local="clr-namespace:DI_Electrical.Views"
|
|
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
|
d:DesignHeight="450"
|
|
d:DesignWidth="800"
|
|
mc:Ignorable="d">
|
|
<Border
|
|
Height="30"
|
|
VerticalAlignment="Top"
|
|
Background="{StaticResource ColorPrimary}"
|
|
MouseDown="Border_MouseDown">
|
|
<Grid>
|
|
<Label
|
|
Height="30"
|
|
VerticalContentAlignment="Center"
|
|
d:Content="标题栏文字"
|
|
Content="{Binding title, Mode=TwoWay}"
|
|
FontSize="12"
|
|
Foreground="White" />
|
|
<Button
|
|
Width="30"
|
|
Height="30"
|
|
HorizontalAlignment="Right"
|
|
VerticalAlignment="Center"
|
|
Background="Transparent"
|
|
BorderBrush="Transparent"
|
|
Command="{Binding CloseCommand}"
|
|
CommandParameter="{Binding RelativeSource={RelativeSource AncestorType=Window}}"
|
|
Content="✖"
|
|
Foreground="White" />
|
|
</Grid>
|
|
</Border>
|
|
</UserControl>
|