<UserControl x:Class="Ink_Canvas.Controls.PopupTitleBar"
             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:ui="http://schemas.inkore.net/lib/ui/wpf/modern"
             mc:Ignorable="d" d:Width="300">
    <Grid Margin="12,8,10,5">
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
            <ColumnDefinition Width="Auto" />
        </Grid.ColumnDefinitions>
        <TextBlock Grid.Column="0" VerticalAlignment="Center" FontSize="20" d:Text="test"
                   Text="{Binding Title, RelativeSource={RelativeSource AncestorType=UserControl}}"
                   Foreground="{DynamicResource FloatingBarPopupTitleForegroundBrush}" FontWeight="Bold"/>
        <Button x:Name="CloseButton" Grid.Column="1"
                Cursor="Hand" VerticalAlignment="Center"
                Padding="4" MinWidth="28" MinHeight="28"
                Background="Transparent" BorderThickness="0">
            <ui:FontIcon Icon="{x:Static ui:SegoeFluentIcons.ChromeCloseContrast}"
                         Foreground="{DynamicResource FloatingBarPopupCloseBrush}" FontSize="16" />
            <Button.Template>
                <ControlTemplate TargetType="Button">
                    <Border x:Name="RootBorder" Background="{TemplateBinding Background}"
                            CornerRadius="4" Padding="{TemplateBinding Padding}">
                        <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center" />
                    </Border>
                    <ControlTemplate.Triggers>
                        <Trigger Property="IsMouseOver" Value="True">
                            <Setter TargetName="RootBorder" Property="Background" Value="#22DC2626" />
                        </Trigger>
                        <Trigger Property="IsPressed" Value="True">
                            <Setter TargetName="RootBorder" Property="Background" Value="#44DC2626" />
                        </Trigger>
                    </ControlTemplate.Triggers>
                </ControlTemplate>
            </Button.Template>
        </Button>
    </Grid>
</UserControl>
