<UserControl x:Class="NestPageUC"
   xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
   xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
   xmlns:EgtWPFLib="clr-namespace:EgtWPFLib;assembly=EgtWPFLib"
   xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
   xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
   mc:Ignorable="d" 
   d:DesignHeight="853.3" d:DesignWidth="1280" Initialized="NestPage_Initialized" Loaded="NestPage_Loaded" Unloaded="NestPage_Unloaded">
      
   <!-- Definizione della NestPage -->
   <Grid Name="NestPageGrid" >
      <Grid.ColumnDefinitions>
         <ColumnDefinition Width="3*"/>
         <ColumnDefinition Width="12*"/>
      </Grid.ColumnDefinitions>
      <Grid.RowDefinitions>
         <RowDefinition Height="1*"/>
         <RowDefinition Height="8*"/>
         <RowDefinition Height="1*"/>
      </Grid.RowDefinitions>

      <Grid Grid.RowSpan="3">
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
         </Grid.ColumnDefinitions>
         <Grid.RowDefinitions>
            <RowDefinition Height="2*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1*"/>
         </Grid.RowDefinitions>

         <Button Name="PartRotOnBtn" Grid.Column="0" Grid.Row="1"
            Style="{DynamicResource OmagCut_YellowIconButton}" Width="48" Height="48">
            <Image Source="{DynamicResource PartRotOnImg}" HorizontalAlignment="Center"
               VerticalAlignment="Center" />
         </Button>
         <Button Name="PartRotOffBtn" Grid.Column="2" Grid.Row="1"
            Style="{DynamicResource OmagCut_YellowIconButton}" Width="48" Height="48">
            <Image Source="{DynamicResource PartRotOffImg}" HorizontalAlignment="Center"
               VerticalAlignment="Center" />
         </Button>

         <Button Name="UpBtn" Grid.Column="1" Grid.Row="1"
            Style="{DynamicResource OmagCut_TopGrayGradientYellowButton}">
            <Image Source="{DynamicResource UpArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
         </Button>
         <Button Name="LeftBtn" Grid.Column="0" Grid.Row="2"
            Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
            <Image Source="{DynamicResource LeftArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
         </Button>
         <ToggleButton Name="MaximizeMoveBtn" Grid.Column="1" Grid.Row="2"
            Style="{DynamicResource OmagCut_YellowIconToggleButton}">
            <Image Source="../Resources/MaxMove.png" Style="{DynamicResource OmagCut_ScaleButtonIcon}"/>
         </ToggleButton>
         <Button Name="RightBtn" Grid.Column="2" Grid.Row="2"
            Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
            <Image Source="{DynamicResource RightArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
         </Button>

         <EgtWPFLib:EgtTextBox Name="StepMoveTxBx" Grid.Column="0" Grid.Row="3" Width="50"
               Style="{DynamicResource OmagCut_CalculatorTextBox}"/>

         <Button Name="DownBtn" Grid.Column="1" Grid.Row="3"
            Style="{DynamicResource OmagCut_BottomGrayGradientYellowButton}">
                <Image Source="{DynamicResource DownArrowImg}" Style="{DynamicResource OmagCut_ArrowButtonIcon}"/>
         </Button>

         <Grid Grid.Column="2" Grid.Row="3" HorizontalAlignment="Center" VerticalAlignment="Center">
            <Grid.ColumnDefinitions>
               <ColumnDefinition Width="Auto"/>
               <ColumnDefinition Width="Auto"/>
            </Grid.ColumnDefinitions>
            <EgtWPFLib:EgtTextBox Name="RotationAngleTxBx"  Width="50"
               Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
            <TextBlock Grid.Column="1" FontSize="30" Margin="2,-5,0,0"
               Text="°"/>
         </Grid>

         <Button Name="RotateCounterClockwiseBtn" Grid.Column="0" Grid.Row="4"
            Style="{DynamicResource OmagCut_LeftGrayGradientYellowButton}">
            <Image Source="{DynamicResource CounterClockwiseRotateImg}" Width="64" Height="65" HorizontalAlignment="Center"
               VerticalAlignment="Center" />
         </Button>
         <ToggleButton Name="MagneticPiecesBtn" Grid.Column="1" Grid.Row="4"
            Style="{DynamicResource OmagCut_YellowIconToggleButton}">
            <Image Source="{DynamicResource AlignPiecesImg}" Width="65" Height="65" HorizontalAlignment="Center"
               VerticalAlignment="Center" />
         </ToggleButton>
         <Button Name="RotateClockwiseBtn" Grid.Column="2" Grid.Row="4"
            Style="{DynamicResource OmagCut_RightGrayGradientYellowButton}">
            <Image Source="{DynamicResource ClockwiseRotateImg}" Width="65" Height="65" HorizontalAlignment="Center"
               VerticalAlignment="Center" />
         </Button>
         
         <UniformGrid Grid.Column="0" Grid.Row="5" Grid.ColumnSpan="3" Columns="2" >
                <Button Name="InsertPartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
                    <Image Source="{DynamicResource Inserisci-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
                </Button>
                <Button Name="StorePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
                    <Image Source="{DynamicResource Parcheggia-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
                </Button>
            </UniformGrid>

            <UniformGrid Name ="UG1"  Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="3" Columns="2" >
                <Button Name="RemovePartBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
                    <Image Source="{DynamicResource Elimina-pezzoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
                </Button>
                <ToggleButton Name="DragRettanleBtn" Style="{DynamicResource OmagCut_YellowIconToggleButton}">
                    <Image Source="{DynamicResource Drag_RettangleImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
                </ToggleButton>
            </UniformGrid>

            <UniformGrid Grid.Column="0" Grid.Row="7" Grid.ColumnSpan="3" Columns="2" >
                <Button Name="SelectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
                    <Image Source="{DynamicResource Seleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
                </Button>
                <Button Name="DeselectAllBtn" Style="{DynamicResource OmagCut_YellowIconButton}">
                    <Image Source="{DynamicResource Deseleziona-tuttoImg}" Style="{StaticResource OmagCut_ArrowButtonIcon}"/>
                </Button>
         </UniformGrid>

      </Grid>

      <!--LowerButtonGrid-->
      <Grid Grid.Column="2" Grid.Row="2">
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="5*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="4*"/>
         </Grid.ColumnDefinitions>

      </Grid>

   </Grid>
   
</UserControl>
