<ContextMenu
    d:DesignHeight="450"
    d:DesignWidth="800"
    mc:Ignorable="d"
    x:Class="PicView.Avalonia.Views.UC.RotationContextMenu"
    x:DataType="vm:MainViewModel"
    xmlns="https://github.com/avaloniaui"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:vm="clr-namespace:PicView.Avalonia.ViewModels"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <MenuItem
        Command="{CompiledBinding Tools.RotateTask}"
        CommandParameter="0"
        GroupName="RotationGroup"
        Header="0°"
        ToggleType="Radio"
        x:Name="Rotation0Item" />
    <MenuItem
        Command="{CompiledBinding Tools.RotateTask}"
        CommandParameter="90"
        GroupName="RotationGroup"
        Header="90°"
        ToggleType="Radio"
        x:Name="Rotation90Item" />
    <MenuItem
        Command="{CompiledBinding Tools.RotateTask}"
        CommandParameter="180"
        GroupName="RotationGroup"
        Header="180°"
        ToggleType="Radio"
        x:Name="Rotation180Item" />
    <MenuItem
        Command="{CompiledBinding Tools.RotateTask}"
        CommandParameter="270"
        GroupName="RotationGroup"
        Header="270°"
        ToggleType="Radio"
        x:Name="Rotation270Item" />
    <Separator />
    <MenuItem Command="{CompiledBinding Tools.FlipCommand}" Header="{CompiledBinding Translation.IsFlipped.Value}">
        <MenuItem.Icon>
            <Path
                Data="{StaticResource FlipGeometry}"
                Fill="{DynamicResource MainTextColor}"
                Height="12"
                Stretch="Fill"
                Width="12">
                <Path.RenderTransform>
                    <ScaleTransform ScaleX="{CompiledBinding PicViewer.ScaleX.Value}" />
                </Path.RenderTransform>
            </Path>
        </MenuItem.Icon>
    </MenuItem>
</ContextMenu>
