<UserControl xmlns:props="clr-namespace:Ink_Canvas.Properties" x:Class="Ink_Canvas.Controls.EraserPopupContent"
             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"
             xmlns:controls="clr-namespace:Ink_Canvas.Controls;assembly=InkCanvas.Controls"
             xmlns:icons="clr-namespace:Ink_Canvas"
             xmlns:c="clr-namespace:Ink_Canvas.Converter"
             mc:Ignorable="d">
    <UserControl.Resources>
        <c:StringToGeometryConverter x:Key="StringToGeometryConverter" />
    </UserControl.Resources>
    <Grid>
        <controls:PopupShellContent x:Name="Shell" Title="{x:Static props:FloatingBarStrings.Board_EraserOptions}" d:Visibility="Collapsed" />
        <ContentControl x:Name="InnerContentHost" Visibility="Collapsed" d:Visibility="Visible">
            <ikw:SimpleStackPanel Margin="10" Spacing="3">
                <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="2"
                                     VerticalAlignment="Center"
                                     HorizontalAlignment="Center">
                    <Label Content="{x:Static props:FloatingBarStrings.Board_Size}" FontWeight="Bold"
                           Foreground="{DynamicResource FloatingBarForegroundBrush}" FontSize="16"
                           VerticalAlignment="Center" />
                    <ComboBox x:Name="ComboBoxEraserSize"
                                  SelectedIndex="2">
                        <ComboBoxItem Content="{x:Static props:CanvasStrings.Canvas_EraserSize_VerySmall}" />
                        <ComboBoxItem Content="{x:Static props:CommonStrings.Size_Small}" />
                        <ComboBoxItem Content="{x:Static props:CommonStrings.Size_Medium}" />
                        <ComboBoxItem Content="{x:Static props:CanvasStrings.Canvas_EraserSize_Large}" />
                        <ComboBoxItem Content="{x:Static props:CanvasStrings.Canvas_EraserSize_VeryLarge}" />
                    </ComboBox>
                </ikw:SimpleStackPanel>
                <TabControl x:Name="EraserTypeTabControl"
                            Style="{StaticResource {x:Static ui:ThemeKeys.TabControlPivotStyleKey}}"
                            SelectedIndex="1">
                    <TabControl.Resources>
                        <sys:Double xmlns:sys="clr-namespace:System;assembly=mscorlib" x:Key="PivotHeaderItemFontSize">16</sys:Double>
                        <Style x:Key="CompactPivotTabItem" TargetType="TabItem" BasedOn="{StaticResource TabItemPivotStyle}">
                            <Setter Property="Height" Value="32" />
                        </Style>
                    </TabControl.Resources>
                    <TabControl.ItemContainerStyle>
                        <Style TargetType="TabItem" BasedOn="{StaticResource CompactPivotTabItem}" />
                    </TabControl.ItemContainerStyle>
                    <TabItem Header="{x:Static props:FloatingBarStrings.Board_EraserShape_Circle}" />
                    <TabItem Header="{x:Static props:FloatingBarStrings.Board_EraserShape_Blackboard}" />
                </TabControl>
                <Button x:Name="ClearInkButton" Foreground="White"
                        HorizontalAlignment="Center">
                    <Button.Resources>
                        <SolidColorBrush x:Key="{x:Static ui:ThemeKeys.ButtonBackgroundKey}" Color="#b91c1c" />
                        <SolidColorBrush x:Key="{x:Static ui:ThemeKeys.ButtonBackgroundPointerOverKey}" Color="#b91c1c" />
                        <SolidColorBrush x:Key="{x:Static ui:ThemeKeys.ButtonBackgroundPressedKey}" Color="#991b1b" />
                    </Button.Resources>
                    <Button.Content>
                        <ikw:SimpleStackPanel Orientation="Horizontal" Spacing="2">
                            <Image RenderOptions.BitmapScalingMode="HighQuality" Height="18">
                                <Image.Source>
                                    <DrawingImage>
                                        <DrawingImage.Drawing>
                                            <DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
                                                <GeometryDrawing Brush="White"
                                                                 Geometry="{Binding Source={x:Static icons:XamlGraphicsIconGeometries.ClearInkIconGeometry}, Converter={StaticResource StringToGeometryConverter}}"/>
                                            </DrawingGroup>
                                        </DrawingImage.Drawing>
                                    </DrawingImage>
                                </Image.Source>
                            </Image>
                            <TextBlock VerticalAlignment="Center"
                                       Foreground="White" FontWeight="Bold"
                                       Text="{x:Static props:FloatingBarStrings.Board_ClearInk}" />
                        </ikw:SimpleStackPanel>
                    </Button.Content>
                </Button>
                <Button x:Name="ClearInkAndHistoryButton" Foreground="White"
                        HorizontalAlignment="Center">
                    <Button.Resources>
                        <SolidColorBrush x:Key="{x:Static ui:ThemeKeys.ButtonBackgroundKey}" Color="#b91c1c" />
                        <SolidColorBrush x:Key="{x:Static ui:ThemeKeys.ButtonBackgroundPointerOverKey}" Color="#b91c1c" />
                        <SolidColorBrush x:Key="{x:Static ui:ThemeKeys.ButtonBackgroundPressedKey}" Color="#991b1b" />
                    </Button.Resources>
                    <Button.Content>
                        <ikw:SimpleStackPanel Orientation="Horizontal">
                            <Image RenderOptions.BitmapScalingMode="HighQuality" Height="18">
                                <Image.Source>
                                    <DrawingImage>
                                        <DrawingImage.Drawing>
                                            <DrawingGroup ClipGeometry="M0,0 V24 H24 V0 H0 Z">
                                                <GeometryDrawing Brush="White"
                                                                 Geometry="{Binding Source={x:Static icons:XamlGraphicsIconGeometries.ClearInkIconGeometry}, Converter={StaticResource StringToGeometryConverter}}"/>
                                            </DrawingGroup>
                                        </DrawingImage.Drawing>
                                    </DrawingImage>
                                </Image.Source>
                            </Image>
                            <TextBlock VerticalAlignment="Center"
                                       Foreground="White" FontWeight="Bold"
                                       Text="{x:Static props:FloatingBarStrings.Board_ClearInkAndHistory}" />
                        </ikw:SimpleStackPanel>
                    </Button.Content>
                </Button>
            </ikw:SimpleStackPanel>
        </ContentControl>
    </Grid>
</UserControl>
