<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:visualizers="clr-namespace:Artemis.UI.Screens.ProfileEditor.VisualEditor.Visualizers"
             mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
             x:Class="Artemis.UI.Screens.ProfileEditor.VisualEditor.Visualizers.LayerShapeVisualizerView"
             x:DataType="visualizers:LayerShapeVisualizerViewModel"
             ClipToBounds="False">
    <UserControl.Styles>
        <Style Selector="Path.layer-visualizer">
            <Setter Property="Stroke" Value="{StaticResource ButtonBorderBrushDisabled}" />
            <Setter Property="Transitions">
                <Setter.Value>
                    <Transitions>
                        <DoubleTransition Property="StrokeThickness" Duration="0:0:0.2" Easing="CubicEaseOut" />
                        <BrushTransition Property="Stroke" Duration="0:0:0.2" Easing="CubicEaseOut" />
                    </Transitions>
                </Setter.Value>
            </Setter>
        </Style>
        <Style Selector="Path.layer-visualizer-selected">
            <Setter Property="Stroke" Value="{StaticResource SystemAccentColorLight1}" />
        </Style>
        <Style Selector="Path.layer-visualizer-unbound">
            <Setter Property="Stroke" Value="{StaticResource ButtonBorderBrushDisabled}" />
            <Setter Property="Opacity" Value="0.50" />
            <Setter Property="Transitions">
                <Setter.Value>
                    <Transitions>
                        <DoubleTransition Property="StrokeThickness" Duration="0:0:0.2" Easing="CubicEaseOut" />
                    </Transitions>
                </Setter.Value>
            </Setter>
        </Style>
        <Style Selector="Path.layer-visualizer-unbound-selected">
            <Setter Property="Opacity" Value="0.75" />
        </Style>
    </UserControl.Styles>
    <Canvas>
        <Path Name="LayerVisualizerUnbound"
              Classes="layer-visualizer-unbound"
              Classes.layer-visualizer-unbound-selected="{CompiledBinding Selected}"
              Data="{CompiledBinding ShapeGeometry, Mode=OneWay}"
              StrokeThickness="4"
              StrokeJoin="Round" />
        <Border Name="LayerVisualizerBounds"
                ClipToBounds="True"
                Width="{CompiledBinding LayerBounds.Width, Mode=OneWay}"
                Height="{CompiledBinding LayerBounds.Height, Mode=OneWay}">
            <Path Name="LayerVisualizer"
                  Classes="layer-visualizer"
                  Classes.layer-visualizer-selected="{CompiledBinding Selected}"
                  Data="{CompiledBinding ShapeGeometry, Mode=OneWay}"
                  StrokeThickness="4"
                  StrokeJoin="Round" />
        </Border>
    </Canvas>


</UserControl>