<UserControl x:Class="_1RM.View.Editor.Forms.Argument.ArgumentListItemButtons"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:editor="clr-namespace:_1RM.View.Editor"
             xmlns:protocol="clr-namespace:_1RM.Model.Protocol"
             mc:Ignorable="d" 
             VerticalAlignment="Center"
             VerticalContentAlignment="Center"
             d:DataContext="{d:DesignInstance protocol:AppArgument}"
             d:DesignHeight="450" d:DesignWidth="800">

    <StackPanel Orientation="Horizontal" 
                VerticalAlignment="Center" 
                Margin="0 0 10 0"
                Visibility="{Binding IsEditable, Converter={StaticResource ConverterBool2Visible}}">

        <Button Margin="2 0"
                Command="{Binding Path=DataContext.CmdMoveArgumentUp, RelativeSource={RelativeSource AncestorType={x:Type editor:ServerEditorPageView}}}" 
                Visibility="{Binding Path=DataContext.IsEditMode, RelativeSource={RelativeSource AncestorType={x:Type editor:ServerEditorPageView}}, Converter={StaticResource ConverterBool2Visible}}" 
                CommandParameter="{Binding}">
            <Grid Height="15" Width="15">
                <Path Data="{StaticResource GeometryArrowUp}"
                      Stroke="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType=Button}}"
                      Fill="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType=Button}}"
                      StrokeThickness="2" Stretch="Uniform" />
            </Grid>
        </Button>

        <Button Margin="2 0"
                Command="{Binding Path=DataContext.CmdMoveArgumentDown, RelativeSource={RelativeSource AncestorType={x:Type editor:ServerEditorPageView}}}" 
                Visibility="{Binding Path=DataContext.IsEditMode, RelativeSource={RelativeSource AncestorType={x:Type editor:ServerEditorPageView}}, Converter={StaticResource ConverterBool2Visible}}" 
                CommandParameter="{Binding}">
            <Grid Height="15" Width="15">
                <Path Data="{StaticResource GeometryArrowDown}"
                      Stroke="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType=Button}}"
                      Fill="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType=Button}}"
                      StrokeThickness="2" Stretch="Uniform" />
            </Grid>
        </Button>
        <Button Margin="2 0"
                Visibility="{Binding Path=DataContext.IsEditMode, RelativeSource={RelativeSource AncestorType={x:Type editor:ServerEditorPageView}}, Converter={StaticResource ConverterBool2Visible}}" 
                Command="{Binding Path=DataContext.CmdEditArgument, RelativeSource={RelativeSource AncestorType={x:Type editor:ServerEditorPageView}}}" 
                CommandParameter="{Binding}">
            <Button.Style>
                <Style TargetType="Button" BasedOn="{StaticResource ButtonAccentStyle}">
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding IsEditable}" Value="False">
                            <Setter Property="Visibility" Value="Collapsed"></Setter>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </Button.Style>
            <Grid Height="15" Width="15">
                <Path Data="{StaticResource GeometryEdit}"
                      Stroke="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType=Button}}"
                      Fill="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType=Button}}"
                      StrokeThickness="1" Stretch="Uniform" />
            </Grid>
        </Button>
        <Button Margin="2 0"
                Command="{Binding Path=DataContext.CmdDeleteArgument, RelativeSource={RelativeSource AncestorType={x:Type editor:ServerEditorPageView}}}" 
                Visibility="{Binding Path=DataContext.IsEditMode, RelativeSource={RelativeSource AncestorType={x:Type editor:ServerEditorPageView}}, Converter={StaticResource ConverterBool2Visible}}" 
                CommandParameter="{Binding}">
            <Grid Height="15" Width="15">
                <Path Data="{StaticResource GeometryDelete}"
                      Stroke="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType=Button}}"
                      Fill="{Binding Foreground, RelativeSource={RelativeSource FindAncestor, AncestorType=Button}}"
                      StrokeThickness="1" Stretch="Uniform" />
            </Grid>
        </Button>
    </StackPanel>
</UserControl>
