72 lines
3.3 KiB
Plaintext
Raw Normal View History

2023-05-11 23:11:39 -04:00
<UserControl xmlns="https://github.com/avaloniaui"
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"
mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
x:Class="SPTInstaller.CustomControls.TitleBar">
2024-05-01 10:31:55 -04:00
<Grid ColumnDefinitions="AUTO,*,AUTO,AUTO">
2023-05-11 23:11:39 -04:00
2024-05-01 10:31:55 -04:00
<Rectangle Grid.ColumnSpan="6" IsHitTestVisible="False"
Fill="{Binding Background, RelativeSource={
RelativeSource AncestorType=UserControl}}" />
2023-05-11 23:11:39 -04:00
2024-05-01 10:31:55 -04:00
<Label Content="{Binding Title, RelativeSource={
2023-05-11 23:11:39 -04:00
RelativeSource AncestorType=UserControl}}"
2024-05-01 10:31:55 -04:00
IsHitTestVisible="False"
Foreground="{Binding Foreground, RelativeSource={
2023-05-11 23:11:39 -04:00
RelativeSource AncestorType=UserControl}}"
2024-05-01 10:31:55 -04:00
Background="Transparent"
VerticalContentAlignment="Center" />
2023-05-11 23:11:39 -04:00
2024-05-01 10:31:55 -04:00
<!-- Minimize (-) Button -->
<Button Content="&#xE949;" Grid.Column="2"
Foreground="{Binding ButtonForeground, RelativeSource={
2023-05-11 23:11:39 -04:00
RelativeSource AncestorType=UserControl}}"
2024-05-01 10:31:55 -04:00
Command="{Binding MinButtonCommand, RelativeSource={
2023-05-11 23:11:39 -04:00
RelativeSource AncestorType=UserControl}}"
2024-05-01 10:31:55 -04:00
Background="Transparent"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
VerticalAlignment="Stretch"
FontFamily="Segoe MDL2 Assets"
CornerRadius="0"
Width="35">
<Button.Styles>
<Style Selector="Button:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="{StaticResource AKI_Brush_DarkGrayBlue}" />
<Setter Property="BorderThickness" Value="0" />
</Style>
<Style Selector="Button:pressed /template/ ContentPresenter">
<Setter Property="Background" Value="{StaticResource AKI_Background_Light}" />
</Style>
</Button.Styles>
</Button>
2023-05-11 23:11:39 -04:00
2024-05-01 10:31:55 -04:00
<!-- Close (X) Button -->
<Button Content="&#xE106;" Grid.Column="3"
Foreground="{Binding ButtonForeground, RelativeSource={
2023-05-11 23:11:39 -04:00
RelativeSource AncestorType=UserControl}}"
2024-05-01 10:31:55 -04:00
Command="{Binding XButtonCommand, RelativeSource={
2023-05-11 23:11:39 -04:00
RelativeSource AncestorType=UserControl}}"
2024-05-01 10:31:55 -04:00
Background="Transparent"
HorizontalContentAlignment="Center"
VerticalContentAlignment="Center"
VerticalAlignment="Stretch"
FontFamily="Segoe MDL2 Assets"
CornerRadius="0"
Width="35">
<Button.Styles>
<Style Selector="Button:pointerover /template/ ContentPresenter">
<Setter Property="Background" Value="IndianRed" />
<Setter Property="BorderThickness" Value="0" />
</Style>
<Style Selector="Button:pressed /template/ ContentPresenter">
<Setter Property="Background" Value="Crimson" />
</Style>
</Button.Styles>
</Button>
2023-05-11 23:11:39 -04:00
2024-05-01 10:31:55 -04:00
</Grid>
2023-05-11 23:11:39 -04:00
2024-05-01 10:31:55 -04:00
</UserControl>