<UserControl xmlns="https://github.com/avaloniaui"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:avalonia="clr-namespace:Material.Icons.Avalonia;assembly=Material.Icons.Avalonia"
             xmlns:keyframes="clr-namespace:Artemis.UI.Screens.ProfileEditor.Properties.Timeline.Keyframes"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="Artemis.UI.Screens.ProfileEditor.Properties.Timeline.Keyframes.TimelineKeyframeView"
             ClipToBounds="False">
    <Ellipse Fill="{DynamicResource SystemAccentColorLight2}"
             Stroke="White"
             Width="10"
             Height="10"
             Margin="-5,0,0,0"
             ToolTip.Tip="{Binding Timestamp}"
             Classes.selected="{Binding IsSelected}"
             PointerPressed="InputElement_OnPointerPressed"
             PointerReleased="InputElement_OnPointerReleased"
             PointerMoved="InputElement_OnPointerMoved"
             Cursor="Hand">
        <Ellipse.Styles>
            <Style Selector="Ellipse">
                <Setter Property="StrokeThickness" Value="0" />
            </Style>
            <Style Selector="Ellipse.selected">
                <Setter Property="StrokeThickness" Value="1" />
            </Style>
        </Ellipse.Styles>
        <Ellipse.Transitions>
            <Transitions>
                <DoubleTransition Property="StrokeThickness" Duration="0:0:0.25" />
            </Transitions>
        </Ellipse.Transitions>
        <Ellipse.ContextFlyout>
            <MenuFlyout Opening="FlyoutBase_OnOpening">
                <MenuItem Header="Easing" ItemsSource="{Binding EasingViewModels}">
                    <MenuItem.Styles>
                        <Style Selector="MenuItem > MenuItem" x:DataType="keyframes:TimelineEasingViewModel">
                            <Setter Property="Command" Value="{CompiledBinding SelectEasingFunction}" />
                            <Setter Property="CommandParameter" Value="{CompiledBinding EasingFunction}" />
                        </Style>
                    </MenuItem.Styles>
                    <MenuItem.Icon>
                        <avalonia:MaterialIcon Kind="Creation" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="-" />
                <MenuItem Header="Duplicate" Command="{Binding Duplicate}" InputGesture="Ctrl+D">
                    <MenuItem.Icon>
                        <avalonia:MaterialIcon Kind="ContentDuplicate" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Copy" Command="{Binding Copy}" InputGesture="Ctrl+C">
                    <MenuItem.Icon>
                        <avalonia:MaterialIcon Kind="ContentCopy" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="Paste" Command="{Binding Paste}" InputGesture="Ctrl+V">
                    <MenuItem.Icon>
                        <avalonia:MaterialIcon Kind="ContentPaste" />
                    </MenuItem.Icon>
                </MenuItem>
                <MenuItem Header="-" />
                <MenuItem Header="Delete" Command="{Binding Delete}" InputGesture="Delete">
                    <MenuItem.Icon>
                        <avalonia:MaterialIcon Kind="Delete" />
                    </MenuItem.Icon>
                </MenuItem>
            </MenuFlyout>
        </Ellipse.ContextFlyout>
    </Ellipse>
</UserControl>