<UserControl x:Class="Ink_Canvas.Controls.ToolbarImageButton"
             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"
             mc:Ignorable="d">
    <Border x:Name="ButtonBorder" CornerRadius="4" Background="Transparent" Margin="0,2,0,7">
        <Grid Name="ButtonPanel" d:Background="Red"
              MouseDown="ButtonPanel_MouseDown"
              MouseLeave="ButtonPanel_MouseLeave"
              MouseUp="ButtonPanel_MouseUp"
              Background="Transparent"
              Width="44" Height="43">
            <Border x:Name="PressedBackground" CornerRadius="4" Background="Transparent" IsHitTestVisible="False" />
            <Grid x:Name="ButtonContent" RenderTransformOrigin="0.5,0.5">
                <Image x:Name="ButtonImage" HorizontalAlignment="Center" VerticalAlignment="Top"
                       RenderOptions.BitmapScalingMode="HighQuality" Height="24" Width="24" Margin="0,1,0,0">
                    <Image.Source>
                        <DrawingImage>
                            <DrawingImage.Drawing>
                                <DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
                                    <GeometryDrawing x:Name="IconGeometryInternal" Brush="{DynamicResource IconForeground}" />
                                    <GeometryDrawing x:Name="BadgeGeometryInternal" Brush="{DynamicResource IconForeground}" />
                                </DrawingGroup>
                            </DrawingImage.Drawing>
                        </DrawingImage>
                    </Image.Source>
                </Image>
                <TextBlock x:Name="LabelTextBlock" Margin="0,0,0,2"
                           HorizontalAlignment="Center" VerticalAlignment="Bottom"
                           Foreground="{DynamicResource FloatBarForeground}"
                           FontSize="13" d:Text="田田田"
                           TextAlignment="Center"
                           Style="{DynamicResource AutoFitMainToolbarLabel8}" />
            </Grid>
        </Grid>
    </Border>
</UserControl>
