<UserControl x:Class="RawPartPageUC"
   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" Loaded="RawPartPage_Loaded" Initialized="RawPartPage_Initialized" Unloaded="RawPartPage_Unloaded">
      
   <!-- Definizione della RowPartPage -->
   <Grid Name="RowPartPageGrid" >
      <Grid.ColumnDefinitions>
         <ColumnDefinition Width="3*"/>
         <ColumnDefinition Width="12*"/>
      </Grid.ColumnDefinitions>
      <Grid.RowDefinitions>
         <RowDefinition Height="1*"/>
         <RowDefinition Height="8*"/>
         <RowDefinition Height="1*"/>
      </Grid.RowDefinitions>
      
      <!-- Definizione della Grid superiore -->
      <Grid Name="UpperButtonGrid" Grid.Column="1" Grid.Row="0" >
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="5*"/>
            <ColumnDefinition Width="7*"/>
         </Grid.ColumnDefinitions>
         
      </Grid>
      
      <!-- Definizione della Grid Laterale -->
      <Grid Name="LeftButtonGrid" Grid.RowSpan="3">
      
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1.5*"/>
            <ColumnDefinition Width="1.5*"/>
         </Grid.ColumnDefinitions>
         <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="4*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="1.5*"/>
            <RowDefinition Height="1.*"/>
            <RowDefinition Height="0.5*"/>
            <RowDefinition Height="1*"/>
         </Grid.RowDefinitions>

         <RadioButton Name="OutlineBtn" Style="{DynamicResource OmagCut_YellowToggleButton}"
               GroupName="DefinitionMethod_GrezzoUC"/>
         <RadioButton Name="DamagedBtn" Style="{DynamicResource OmagCut_YellowToggleButton}"
               Grid.Column="1" GroupName="DefinitionMethod_GrezzoUC"/>

         <!-- Definizione della Grid per definizione grezzo -->
         <Grid Name="RawMeasureGrd" Grid.Row="1" Grid.ColumnSpan="2">
            <Grid.ColumnDefinitions>
               <ColumnDefinition Width="1*"/>
               <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
               <RowDefinition Height="1*"/>
               <RowDefinition Height="0.5*"/>
               <RowDefinition Height="0.5*"/>
               <RowDefinition Height="0.5*"/>
               <RowDefinition Height="0.5*"/>
               <RowDefinition Height="0.5*"/>
               <RowDefinition Height="0.5*"/>
            </Grid.RowDefinitions>

            <ComboBox Name="RawModeCmBx" Grid.Row="0" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" 
               MaxDropDownHeight="300" Margin="6,0,6,0">
               <ComboBox.ItemTemplate>
                  <DataTemplate>
                     <TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
                  </DataTemplate>
               </ComboBox.ItemTemplate>
            </ComboBox>

            <ComboBox Name="RawModeDamagedCmBx" Grid.Row="0" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_ComboBox}" 
               MaxDropDownHeight="300" Margin="6,0,6,0">
                    <ComboBox.ItemTemplate>
                        <DataTemplate>
                            <TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
                        </DataTemplate>
                    </ComboBox.ItemTemplate>
                </ComboBox>

                <TextBlock Name="LengthTxBl" Grid.Row="1" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
            <EgtWPFLib:EgtTextBox Name="LengthTxBx" Grid.Column="1" Grid.Row="1" Margin="13,0,6,0"
               Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
            <TextBlock Name="WidthTxBl" Grid.Row="2" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
            <EgtWPFLib:EgtTextBox Name="WidthTxBx" Grid.Column="1" Grid.Row="2" Margin="13,0,6,0"
               Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
            <TextBlock Name="HeightTxBl" Grid.Row="3" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
            <EgtWPFLib:EgtTextBox Name="HeightTxBx" Grid.Column="1" Grid.Row="3" Margin="13,0,6,0"
               Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
            <TextBlock Name="OffsetXTxBl" Grid.Row="4" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
            <EgtWPFLib:EgtTextBox Name="OffsetXTxBx" Grid.Column="1" Grid.Row="4" Margin="13,0,6,0"
               Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
            <TextBlock Name="OffsetYTxBl" Grid.Row="5" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
            <EgtWPFLib:EgtTextBox Name="OffsetYTxBx" Grid.Column="1" Grid.Row="5" Margin="13,0,6,0"
               Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
            <TextBlock Name="KerfTxBl" Grid.Row="6" Style="{DynamicResource OmagCut_CurrProjSummeryTextBlock}"/>
            <EgtWPFLib:EgtTextBox Name="KerfTxBx" Grid.Column="1" Grid.Row="6" Margin="13,0,6,0"
               Style="{DynamicResource OmagCut_CalculatorTextBox}"/>

         </Grid>
                  
         <!-- Definizione della Grid per il materiale -->
         <GroupBox Name="MaterialGpBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_GroupBox}">

            <ComboBox Name="MaterialsCmbx" Style="{StaticResource OmagCut_ComboBox}"
               MaxDropDownHeight="600">
               <ComboBox.ItemTemplate>
                  <DataTemplate>
                     <TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
                  </DataTemplate>
               </ComboBox.ItemTemplate>
            </ComboBox>

         </GroupBox>

         <!-- Definizione della Grid per Punti -->
         <GroupBox Name="PointsGpBx" Grid.Row="3" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_GroupBox}" >

            <Grid >
               <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="1.5*"/>
                  <ColumnDefinition Width="1.5*"/>
               </Grid.ColumnDefinitions>
               <Grid.RowDefinitions>
                  <RowDefinition Height="1*"/>
                  <RowDefinition Height="1*"/>
               </Grid.RowDefinitions>

               <ToggleButton Name="AddBtn"
                  Style="{DynamicResource OmagCut_YellowToggleButton}"/>
               <ToggleButton Name="RemoveBtn" Grid.Column="1"
                  Style="{DynamicResource OmagCut_YellowToggleButton}"/>
               <Button Name="CloseBtn" Grid.Row="1" Grid.ColumnSpan="2" 
                  Style="{DynamicResource OmagCut_YellowTextButton}"/>
            </Grid>
            
         </GroupBox>

         <!-- Definizione della Grid per Zona rovinata -->
         <GroupBox Name="DamagedAreaGpBx" Grid.Row="4" Grid.ColumnSpan="2" Grid.RowSpan="2" Style="{DynamicResource OmagCut_GroupBox}">

            <Grid>
               <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="1*"/>
                  <ColumnDefinition Width="1*"/>
               </Grid.ColumnDefinitions>

               <ToggleButton Name="NewBtn" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
               <ToggleButton Name="DeleteBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowToggleButton}"/>
            </Grid>

         </GroupBox>

         <Button Name="ConfirmPhotoBtn" Grid.Row="4" Grid.ColumnSpan="2" Visibility="Hidden" 
            Style="{DynamicResource OmagCut_YellowTextButton}"/>

      </Grid>
      
      <!-- Definizione della Grid Inferiore per i Button V e X -->
      <Grid Name="LowerButtonGrid" Grid.Column="1" Grid.Row="3">
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="6*"/>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="1*"/>
         </Grid.ColumnDefinitions>

         <Button Name="RawProbingBtn" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
            <Image Source="{DynamicResource RawProbeImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
         </Button>

         <Button Name="BarCodeBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
            <Image Source="{DynamicResource BarCodeImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
         </Button>

         <Button Name="SlabIdBtn" Grid.Column="3" Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
            <Image Source="{DynamicResource SlabIdImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
         </Button>

         <Button Name="OkBtn" Grid.Column="5" Style="{DynamicResource OmagCut_GradientBlueIconButton}">
            <Image Source="{DynamicResource VImg}" Width="65" Height="65" HorizontalAlignment="Center"
            VerticalAlignment="Center" />
         </Button>
         
      </Grid>
      
   </Grid>
   
</UserControl>
