<customControls:AnimatedMenu
    IsOpen="{CompiledBinding MainWindow.IsFileMenuVisible.Value}"
    mc:Ignorable="d"
    x:Class="PicView.Avalonia.Views.UC.Menus.FileMenu"
    x:DataType="viewModels:MainViewModel"
    xmlns="https://github.com/avaloniaui"
    xmlns:customControls="clr-namespace:PicView.Avalonia.CustomControls"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewModels="clr-namespace:PicView.Avalonia.ViewModels"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Design.DataContext>
        <viewModels:MainViewModel />
    </Design.DataContext>
    <StackPanel>
        <StackPanel.Styles>
            <Styles>
                <Style Selector="TextBlock.btnTxt">
                    <Setter Property="MaxWidth" Value="105" />
                    <Setter Property="VerticalAlignment" Value="Center" />
                    <Setter Property="Foreground" Value="{DynamicResource MainTextColor}" />
                </Style>
                <Style Selector="Button.btn, RepeatButton.btn">
                    <Setter Property="Canvas.Top" Value="-1" />
                    <Setter Property="Width" Value="45" />
                    <Setter Property="Height" Value="46" />
                    <Setter Property="Background" Value="Transparent" />
                    <Setter Property="BorderThickness" Value="0,0,1,0" />
                    <Setter Property="BorderBrush" Value="{DynamicResource MainBorderColor}" />
                    <Setter Property="Foreground" Value="{DynamicResource MainTextColor}" />
                </Style>
            </Styles>
        </StackPanel.Styles>
        <Border
            Background="{DynamicResource MenuBackgroundColor}"
            BorderBrush="{DynamicResource OuterBorderColor}"
            BorderThickness="1"
            CornerRadius="8"
            Effect="{DynamicResource MenuShadowButtonBorder}"
            x:Name="MainBorder">
            <Canvas Height="208" Width="315">

                <Border
                    Background="{DynamicResource SecondaryBackgroundColor}"
                    BorderBrush="{DynamicResource OuterBorderColor}"
                    BorderThickness="0,0,0,1"
                    CornerRadius="8,8,0,0"
                    Height="47"
                    Width="315"
                    x:Name="TopBorder" />

                <customControls:IconButton
                    Canvas.Left="-1"
                    Classes="hover btn"
                    Command="{Binding Navigation.ReloadCommand}"
                    CornerRadius="8,0,0,0"
                    Data="{StaticResource ReloadGeometry}"
                    IconHeight="17"
                    IconWidth="17"
                    IsEnabled="{CompiledBinding PicViewer.ImageSource.Value,
                                                Converter={x:Static ObjectConverters.IsNotNull}}"
                    ToolTip.Tip="{CompiledBinding Translation.Reload.Value,
                                                  Mode=OneWay}" />

                <customControls:IconButton
                    Canvas.Left="44"
                    Classes="hover btn"
                    Command="{CompiledBinding Tools.PrintCommand}"
                    CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
                                                       FallbackValue=''}"
                    Data="{StaticResource PrintGeometry}"
                    IconHeight="17"
                    IconWidth="17"
                    IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
                                                Converter={x:Static ObjectConverters.IsNotNull}}"
                    ToolTip.Tip="{CompiledBinding Translation.Print.Value,
                                                  Mode=OneWay}"
                    x:Name="PrintButton" />

                <customControls:IconButton
                    Canvas.Left="90"
                    Classes="hover btn"
                    Command="{CompiledBinding Tools.RecycleFileCommand}"
                    CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
                                                       FallbackValue=''}"
                    Data="{StaticResource RecycleGeometry}"
                    IconHeight="17"
                    IconWidth="17"
                    IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
                                                Converter={x:Static ObjectConverters.IsNotNull}}"
                    ToolTip.Tip="{CompiledBinding Translation.DeleteFile.Value,
                                                  Mode=OneWay}" />

                <customControls:IconButton
                    Canvas.Left="134"
                    Classes="hover btn"
                    Command="{CompiledBinding Tools.SaveFileCommand}"
                    Data="{StaticResource SaveGeometry}"
                    IconHeight="17"
                    IconWidth="17"
                    IsEnabled="{CompiledBinding PicViewer.ImageSource.Value,
                                                Converter={x:Static ObjectConverters.IsNotNull}}"
                    ToolTip.Tip="{CompiledBinding Translation.Save,
                                                  Mode=OneWay}" />

                <customControls:IconButton
                    Canvas.Left="180"
                    Classes="hover btn"
                    Command="{CompiledBinding Tools.CopyFileCommand}"
                    CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
                                                       FallbackValue=''}"
                    Data="{StaticResource CopyGeometry}"
                    IconHeight="17"
                    IconWidth="17"
                    IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
                                                Converter={x:Static ObjectConverters.IsNotNull}}"
                    ToolTip.Tip="{CompiledBinding Translation.CopyFile.Value,
                                                  Mode=OneWay}" />

                <customControls:IconButton
                    Canvas.Left="224"
                    Classes="hover btn"
                    Command="{CompiledBinding Tools.DuplicateFileCommand}"
                    CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
                                                       FallbackValue=''}"
                    Data="{StaticResource DuplicateGeometry}"
                    IconHeight="17"
                    IconWidth="17"
                    IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
                                                Converter={x:Static ObjectConverters.IsNotNull}}"
                    ToolTip.Tip="{CompiledBinding Translation.DuplicateFile.Value,
                                                  Mode=OneWay}" />

                <customControls:IconButton
                    BorderThickness="0"
                    Canvas.Left="270"
                    Classes="hover btn"
                    ClickMode="Release"
                    Command="{CompiledBinding MainWindow.CloseMenuCommand}"
                    CornerRadius="0,8,0,0"
                    Data="{StaticResource CloseGeometry}"
                    IconHeight="10"
                    IconWidth="10"
                    ToolTip.Tip="{CompiledBinding Translation.Close.Value,
                                                  Mode=OneWay}"
                    Width="47" />

                <customControls:TextIconButton
                    Background="{DynamicResource MenuButtonColor}"
                    Canvas.Left="7"
                    Canvas.Top="53"
                    Classes="ButtonBorder altHover"
                    Command="{CompiledBinding Tools.OpenFileCommand}"
                    Data="{StaticResource FolderGeometry}"
                    Foreground="{DynamicResource MainTextColor}"
                    Height="46"
                    IconHeight="17"
                    IconMargin="9,0,9,0"
                    IconWidth="21.39"
                    Text="{CompiledBinding Translation.Open.Value,
                                           Mode=OneWay}"
                    ToolTip.Tip="{CompiledBinding Translation.OpenFileDialog.Value,
                                                  Mode=OneWay}"
                    x:Name="OpenButton" />

                <customControls:TextIconButton
                    Background="{DynamicResource MenuButtonColor}"
                    Canvas.Left="7"
                    Canvas.Top="104"
                    Classes="ButtonBorder altHover"
                    Command="{CompiledBinding Tools.OpenWithCommand}"
                    CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
                                                       FallbackValue=''}"
                    Foreground="{DynamicResource MainTextColor}"
                    Height="46"
                    Icon="{StaticResource OpenExternalImage}"
                    IconHeight="17"
                    IconMargin="11,0,11,0"
                    IconWidth="17"
                    IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
                                                Converter={x:Static ObjectConverters.IsNotNull}}"
                    Text="{CompiledBinding Translation.OpenWith.Value,
                                           Mode=OneWay}"
                    ToolTip.Tip="{CompiledBinding Translation.OpenWith.Value}"
                    x:Name="OpenWithButton" />

                <customControls:TextIconButton
                    Background="{DynamicResource MenuButtonColor}"
                    Canvas.Left="160"
                    Canvas.Top="53"
                    Classes="ButtonBorder altHover"
                    Command="{CompiledBinding Tools.LocateOnDiskCommand}"
                    CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName,
                                                       FallbackValue=''}"
                    Data="{StaticResource ShowInFolderGeometry}"
                    Foreground="{DynamicResource MainTextColor}"
                    Height="46"
                    IconHeight="19"
                    IconMargin="11,0,9,0"
                    IconWidth="19"
                    IsEnabled="{CompiledBinding PicViewer.FileInfo,
                                                Converter={x:Static ObjectConverters.IsNotNull}}"
                    Text="{CompiledBinding Translation.ShowInFolder.Value,
                                           Mode=OneWay}"
                    ToolTip.Tip="{CompiledBinding Translation.ShowInFolder.Value,
                                                  Mode=OneWay}"
                    x:Name="ShowInFolderButton" />

                <customControls:TextIconButton
                    Background="{DynamicResource MenuButtonColor}"
                    Canvas.Left="160"
                    Canvas.Top="104"
                    Classes="ButtonBorder altHover"
                    Command="{CompiledBinding Tools.SaveFileAsCommand}"
                    Data="{StaticResource SaveGeometry}"
                    Foreground="{DynamicResource MainTextColor}"
                    Height="46"
                    IconHeight="19"
                    IconMargin="12,0,11,0"
                    IconWidth="19"
                    IsEnabled="{CompiledBinding PicViewer.FileInfo.Value,
                                                Converter={x:Static ObjectConverters.IsNotNull}}"
                    Text="{CompiledBinding Translation.SaveAs.Value,
                                           Mode=OneWay}"
                    TextMaxWidth="105"
                    ToolTip.Tip="{CompiledBinding Translation.SaveAs.Value,
                                                  Mode=OneWay}"
                    x:Name="SaveAsButton" />

                <customControls:TextIconButton
                    Background="{DynamicResource MenuButtonColor}"
                    Canvas.Left="7"
                    Canvas.Top="155"
                    Classes="ButtonBorder altHover"
                    Command="{CompiledBinding Tools.PasteCommand}"
                    Data="{StaticResource PasteGeometry}"
                    Foreground="{DynamicResource MainTextColor}"
                    Height="46"
                    IconHeight="19"
                    IconMargin="12,0,11,0"
                    IconWidth="19"
                    Text="{CompiledBinding Translation.Paste.Value,
                                           Mode=OneWay}"
                    ToolTip.Tip="{CompiledBinding Translation.Paste.Value,
                                                  Mode=OneWay}"
                    x:Name="PasteButton" />

                <customControls:TextIconButton
                    Background="{DynamicResource MenuButtonColor}"
                    Canvas.Left="160"
                    Canvas.Top="155"
                    Classes="ButtonBorder altHover"
                    Command="{CompiledBinding Window.NewWindow}"
                    Foreground="{DynamicResource MainTextColor}"
                    Height="46"
                    Icon="{StaticResource WindowImage}"
                    IconHeight="20"
                    IconMargin="11,0,13,0"
                    IconWidth="20"
                    Text="{CompiledBinding Translation.NewWindow.Value,
                                           Mode=OneWay}"
                    ToolTip.Tip="{Binding Translation.NewWindow.Value, Mode=OneWay}"
                    x:Name="NewWindowButton" />
            </Canvas>
        </Border>
        <Polygon
            Fill="{DynamicResource MenuBackgroundColor}"
            Margin="7,-1,0,0"
            Points="0,0 15,30, 30,0"
            Stroke="{DynamicResource MainBorderColor}"
            StrokeThickness="1"
            x:Name="DownArrow" />
    </StackPanel>
</customControls:AnimatedMenu>