<UserControl x:Class="Ink_Canvas.Controls.PopupTabTitleBar"
             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:ikw="http://schemas.inkore.net/lib/ui/wpf"
             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>
        <ikw:SimpleStackPanel x:Name="TabsPanel" Grid.Column="0"
                              Orientation="Horizontal" VerticalAlignment="Center"
                              Spacing="4" />
        <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 FloatingBarPopupTitleForegroundBrush}" 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>
