<UserControl
    d:DesignHeight="450"
    d:DesignWidth="800"
    mc:Ignorable="d"
    x:Class="PicView.Avalonia.Views.UC.Buttons.StarOutlineButtons"
    x:DataType="viewModels: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:viewModels="clr-namespace:PicView.Avalonia.ViewModels"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <Design.DataContext>
        <viewModels:MainViewModel />
    </Design.DataContext>

    <StackPanel Orientation="Horizontal">
        <Canvas
            PointerEntered="Star1_OnPointerEntered"
            PointerExited="Stars_OnPointerExited"
            PointerPressed="OneStarCLick"
            Width="30">
            <Button
                Background="Transparent"
                Canvas.Left="5"
                Canvas.Top="3"
                Command="{CompiledBinding Exif.SetExifRating1Command}"
                CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName}"
                Foreground="{DynamicResource MainTextColor}"
                ToolTip.Tip="{Binding Translation._1Star, Mode=OneWay}"
                x:Name="Star1">
                <Image
                    Height="20"
                    Source="{StaticResource StarOutlineDrawingImage}"
                    Width="20"
                    x:Name="Star1Icon" />
            </Button>
        </Canvas>
        <Canvas
            PointerEntered="Star2_OnPointerEntered"
            PointerExited="Stars_OnPointerExited"
            PointerPressed="TwoStarCLick"
            Width="30">
            <Button
                Background="Transparent"
                Canvas.Left="3"
                Canvas.Top="3"
                Command="{CompiledBinding Exif.SetExifRating2Command}"
                CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName}"
                ToolTip.Tip="{Binding Translation._2Star, Mode=OneWay}"
                x:Name="Star2">
                <Image
                    Height="20"
                    Source="{StaticResource StarOutlineDrawingImage}"
                    Width="20"
                    x:Name="Star2Icon" />
            </Button>
        </Canvas>
        <Canvas
            PointerEntered="Star3_OnPointerEntered"
            PointerExited="Stars_OnPointerExited"
            PointerPressed="ThreeStarCLick"
            Width="30">
            <Button
                Background="Transparent"
                Canvas.Left="3"
                Canvas.Top="3"
                Command="{CompiledBinding Exif.SetExifRating3Command}"
                CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName}"
                ToolTip.Tip="{Binding Translation._3Star, Mode=OneWay}"
                x:Name="Star3">
                <Image
                    Height="20"
                    Source="{StaticResource StarOutlineDrawingImage}"
                    Width="20"
                    x:Name="Star3Icon" />
            </Button>
        </Canvas>
        <Canvas
            PointerEntered="Star4_OnPointerEntered"
            PointerExited="Stars_OnPointerExited"
            PointerPressed="FourStarCLick"
            Width="30">
            <Button
                Background="Transparent"
                Canvas.Left="3"
                Canvas.Top="3"
                Command="{CompiledBinding Exif.SetExifRating4Command}"
                CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName}"
                ToolTip.Tip="{Binding Translation._4Star, Mode=OneWay}"
                x:Name="Star4">
                <Image
                    Height="20"
                    Source="{StaticResource StarOutlineDrawingImage}"
                    Width="20"
                    x:Name="Star4Icon" />
            </Button>
        </Canvas>
        <Canvas
            PointerEntered="Star5_OnPointerEntered"
            PointerExited="Stars_OnPointerExited"
            PointerPressed="FiveStarCLick"
            Width="30">
            <Button
                Background="Transparent"
                Canvas.Left="3"
                Canvas.Top="3"
                Command="{CompiledBinding Exif.SetExifRating5Command}"
                CommandParameter="{CompiledBinding PicViewer.FileInfo.Value.FullName}"
                ToolTip.Tip="{Binding Translation._5Star, Mode=OneWay}"
                x:Name="Star5">
                <Image
                    Height="20"
                    Source="{StaticResource StarOutlineDrawingImage}"
                    Width="20"
                    x:Name="Star5Icon" />
            </Button>
        </Canvas>
    </StackPanel>
</UserControl>