<UserControl x:Class="AlarmsPageUC"
   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="768" d:DesignWidth="1280">

   <!-- Definizione della AlarmsPage -->
   <Border Style="{DynamicResource OmagCut_PageBorder}" >

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

                <RowDefinition Height="1.5*"/>
                <RowDefinition Height="0.5*"/>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="0.5*"/>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="1*"/>
                <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>

            <!--Costruisco le riche per la colonna 3-->
            <Grid Grid.Column="2" Grid.RowSpan="9">
                <Grid.RowDefinitions>
                    <!--GruopBox: taglio lama-->
                    <RowDefinition Height="1*"/>
                    <RowDefinition Height="1*"/>
                    <RowDefinition Height="1*"/>
                    <RowDefinition Height="1*"/>
                    <RowDefinition Height="1*"/>
                    <!--GruopBoxs: Fresatura/>Foratura/WaterJet-->
                    <RowDefinition Height="1*"/>
                    <RowDefinition Height="1*"/>
                    <RowDefinition Height="1*"/>
                    <RowDefinition Height="0.5*"/>
                    <RowDefinition Height="1*"/>
                    <RowDefinition Height="1*"/>
                    <RowDefinition Height="0.5*"/>
                    <!--GroupBox: vai ad Home-->
                    <RowDefinition Height="1*"/>
                    <RowDefinition Height="0.375*"/>
                </Grid.RowDefinitions>

                <!--Parametri Taglio Lama: 5 Parametri-->
                <GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="4">
                    <!--definizione della grigli ainterna-->
                    <Grid>
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="2*"/>
                            <ColumnDefinition Width="2*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.5*"/>
                            <RowDefinition Height="0.5*"/>
                            <RowDefinition Height="0.5*"/>
                            <RowDefinition Height="0.5*"/>
                            <RowDefinition Height="0.5*"/>
                        </Grid.RowDefinitions>

                        <TextBlock Name="CutExtraLenTxBl" Grid.Column="0" Grid.Row="0"
                                   Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                        <EgtWPFLib:EgtTextBox Name="CutExtraLenTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
                                   Style="{DynamicResource OmagCut_CalculatorTextBox}" />

                        <TextBlock Name="AngleCutExtraLenTxBl" Grid.Column="0" Grid.Row="1"
                                   Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                        <EgtWPFLib:EgtTextBox Name="AngleCutExtraLenTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
                                   Style="{DynamicResource OmagCut_CalculatorTextBox}" />

                        <TextBlock Name="ExtArcMinRadTxBl" Grid.Column="0" Grid.Row="2"
                                   Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                        <EgtWPFLib:EgtTextBox Name="ExtArcMinRadTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
                                   Style="{DynamicResource OmagCut_CalculatorTextBox}"/>

                        <TextBlock Name="IntArcMaxSideAngTxBl" Grid.Column="0" Grid.Row="3"
                                   Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                        <EgtWPFLib:EgtTextBox Name="IntArcMaxSideAngTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
                                   Style="{DynamicResource OmagCut_CalculatorTextBox}"/>

                        <TextBlock Name="PreCutExitTxBl" Grid.Column="0" Grid.Row="4"
                                   Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                        <CheckBox Name="PreCutExitChBx" Grid.Column="1" Grid.Row="4" Margin="10,0,10,0"
                                  Style="{StaticResource OmagCut_CheckBox_Single}" 
                                  HorizontalAlignment="Right"/>

                    </Grid>

                </GroupBox>

                <Grid Grid.Column="2" Grid.Row="4" Grid.RowSpan="8">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition />
                        <ColumnDefinition />
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="0.5*"/>
                        <RowDefinition Height="*"/>
                        <RowDefinition Height="*"/>
                    </Grid.RowDefinitions>

                    <!--Parametri fori: 4 Parametri-->
                    <GroupBox Name="HolesGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="3" 
                              Style="{DynamicResource OmagCut_GroupBox}">

                        <Grid>
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="145*"/>
                                <ColumnDefinition Width="23*"/>
                                <ColumnDefinition Width="169*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="0.5*"/>
                                <RowDefinition Height="0.5*"/>
                                <RowDefinition Height="0.5*"/>
                                <RowDefinition Height="0.5*"/>
                            </Grid.RowDefinitions>

                            <TextBlock Name="HolesOffsetTxBl" Grid.Column="0" Grid.Row="0"
                                       Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
                            <EgtWPFLib:EgtTextBox Name="HolesOffsetTxBx" Grid.Column="2" Grid.Row="0" Margin="10,0,10,0"
                                       Style="{DynamicResource OmagCut_CalculatorTextBox}" />

                            <TextBlock Name="HolesOverlapTxBl" Grid.Column="0" Grid.Row="1"
                                       Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
                            <EgtWPFLib:EgtTextBox Name="HolesOverlapTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
                                       Style="{DynamicResource OmagCut_CalculatorTextBox}" />

                            <TextBlock Name="HolesToleranceTxBl" Grid.Column="0" Grid.Row="2"
                                       Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
                            <EgtWPFLib:EgtTextBox Name="HolesToleranceTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
                                       Style="{DynamicResource OmagCut_CalculatorTextBox}" />

                            <TextBlock Name="OneHoleInCornerTxBl" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="3"
                                       Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
                            <CheckBox Name="OneHoleInCornerChBx" Grid.Column="2" Grid.Row="3" Style="{StaticResource OmagCut_CheckBox_Single}"
                                      HorizontalAlignment="Right" Margin="10,0,10,0"/>

                        </Grid>

                    </GroupBox>

                    <!--Parametri Fresatura: 3 Parametri-->
                    <GroupBox Name="MillingsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Grid.RowSpan="2">
                        <Grid Grid.Column="3" Grid.Row="2">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="2*"/>
                                <ColumnDefinition Width="2*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="*"/>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>

                            <TextBlock Name="CornerCutsTxBl" Grid.Row="0" Grid.ColumnSpan="2"
                                       Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                            <CheckBox Name="CornerCutsChBx" Grid.Row="0" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
                                      HorizontalAlignment="Right" Margin="0,0,10,0"/>

                            <TextBlock Name="InternalCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
                                       Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
                            <CheckBox Name="InternalCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
                                      HorizontalAlignment="Right" Margin="0,0,10,0"/>

                            <TextBlock Name="ShortTxBl" Grid.Column="0" Grid.Row="2"
                                       Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                            <EgtWPFLib:EgtTextBox Name="ShortTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
                                       Style="{DynamicResource OmagCut_CalculatorTextBox}"/>

                        </Grid>

                    </GroupBox>

                    <!--Parametri WaterJet: 1 Parametro (se questo GroupBox attivo allora nascondo Fori/Fresatura)-->
                    <GroupBox Name="WjsParamGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="1" 
                              Style="{DynamicResource OmagCut_GroupBox}">
                        <Grid Grid.Column="3" Grid.Row="2">
                            <Grid.ColumnDefinitions>
                                <ColumnDefinition Width="2*"/>
                                <ColumnDefinition Width="2*"/>
                            </Grid.ColumnDefinitions>
                            <Grid.RowDefinitions>
                                <RowDefinition Height="*"/>
                            </Grid.RowDefinitions>

                            <TextBlock Name="WjIntCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
                                       Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
                            <CheckBox Name="WjIntCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
                                      HorizontalAlignment="Right" Margin="0,0,10,0"/>

                        </Grid>
                    </GroupBox>

                </Grid>

                <!--Parametri Taglio diretto: 1 Parametro-->
                <GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="12" Grid.RowSpan="2">
                    <Grid>
                        <TextBlock Name="FinalHomeTxBl"
                                   Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                        <CheckBox Name="FinalHomeChBx" Style="{StaticResource OmagCut_CheckBox_Single}"
                                  HorizontalAlignment="Right" Margin="0,0,10,0"/>
                    </Grid>

                </GroupBox>

            </Grid>

            <Grid Grid.RowSpan="3">
                <Grid.RowDefinitions>
                    <RowDefinition Height="1.75*"/>
                    <RowDefinition Height="0.5*"/>
                    <RowDefinition Height="0.5*"/>
                    <RowDefinition Height="1*"/>
                </Grid.RowDefinitions>

                <GroupBox Name="SetUpGpBx" Grid.ColumnSpan="3" Grid.RowSpan="9"
               Style="{DynamicResource OmagCut_GroupBox}">

                    <Grid Name="CurrToolsGrid" Grid.ColumnSpan="2">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.5*"/>
                            <ColumnDefinition Width="3*"/>
                            <ColumnDefinition Width="0.5*"/>
                        </Grid.ColumnDefinitions>
                        <Grid.RowDefinitions>
                            <RowDefinition Height="0.5*"/>
                            <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>

                        <TextBlock Name="CurrSawTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="3"
                     Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>
                        <ComboBox x:Name="CurrSawCmBx" Grid.Column="1" Grid.Row="1" Style="{DynamicResource OmagCut_ComboBox}">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>

                        <TextBlock Name="AuxiliaryToolTxBl" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="3"
                     Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
                     Visibility="Hidden"/>
                        <ComboBox Name="AuxiliaryToolCmBx" Grid.Column="1" Grid.Row="3" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>

                        <TextBlock Name="CurrDrillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
                     Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
                     Visibility="Hidden"/>
                        <ComboBox Name="CurrDrillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>

                        <TextBlock Name="CurrMillTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
                     Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
                     Visibility="Hidden"/>
                        <ComboBox Name="CurrMillCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>

                        <TextBlock Name="CurrCupWheelTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
                     Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
                     Visibility="Hidden"/>
                        <ComboBox Name="CurrCupWheelCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>

                        <TextBlock Name="CurrWJetTxBl" Grid.Column="0" Grid.Row="4" Grid.ColumnSpan="3"
                     Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"
                     Visibility="Hidden"/>
                        <ComboBox Name="CurrWJetCmBx" Grid.Column="1" Grid.Row="5" Style="{StaticResource OmagCut_ComboBox}" Visibility="Hidden">
                            <ComboBox.ItemTemplate>
                                <DataTemplate>
                                    <TextBlock Text="{Binding}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
                                </DataTemplate>
                            </ComboBox.ItemTemplate>
                        </ComboBox>

                        <Button Name="SetUpBtn"  Grid.Column="1" Grid.Row="3" Grid.RowSpan="2" Visibility="Hidden"
                     Style="{DynamicResource OmagCut_YellowTextButton}"/>

                    </Grid>

                </GroupBox>

            </Grid>

            <!--<Grid Grid.Column="2" Grid.Row="2" Grid.RowSpan="6">
            <Grid.ColumnDefinitions>
               <ColumnDefinition />
               <ColumnDefinition />
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
               <RowDefinition Height="*"/>
               <RowDefinition Height="*"/>
               <RowDefinition Height="0.5*"/>
               <RowDefinition Height="*"/>
               <RowDefinition Height="*"/>
            </Grid.RowDefinitions>

            <GroupBox Name="HolesGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="3" 
               Style="{DynamicResource OmagCut_GroupBox}">

               <Grid>
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="145*"/>
                     <ColumnDefinition Width="23*"/>
                     <ColumnDefinition Width="169*"/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                     <RowDefinition Height="0.5*"/>
                     <RowDefinition Height="0.5*"/>
                     <RowDefinition Height="0.5*"/>
                     <RowDefinition Height="0.5*"/>
                  </Grid.RowDefinitions>

                  <TextBlock Name="HolesOffsetTxBl" Grid.Column="0" Grid.Row="0"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
                  <EgtWPFLib:EgtTextBox Name="HolesOffsetTxBx" Grid.Column="2" Grid.Row="0" Margin="10,0,10,0"
                     Style="{DynamicResource OmagCut_CalculatorTextBox}" />

                  <TextBlock Name="HolesOverlapTxBl" Grid.Column="0" Grid.Row="1"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
                  <EgtWPFLib:EgtTextBox Name="HolesOverlapTxBx" Grid.Column="2" Grid.Row="1" Margin="10,0,10,0"
                     Style="{DynamicResource OmagCut_CalculatorTextBox}" />

                  <TextBlock Name="HolesToleranceTxBl" Grid.Column="0" Grid.Row="2"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="2" Margin="10,0,10,0"/>
                  <EgtWPFLib:EgtTextBox Name="HolesToleranceTxBx" Grid.Column="2" Grid.Row="2" Margin="10,0,10,0"
                     Style="{DynamicResource OmagCut_CalculatorTextBox}" />

                  <TextBlock Name="OneHoleInCornerTxBl" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="3"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,10,0" />
                  <CheckBox Name="OneHoleInCornerChBx" Grid.Column="2" Grid.Row="3" Style="{StaticResource OmagCut_CheckBox_Single}"
                     HorizontalAlignment="Right" Margin="10,0,10,0"/>

               </Grid>

            </GroupBox>

            <GroupBox Name="MillingsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="2" Grid.RowSpan="2">
               <Grid Grid.Column="3" Grid.Row="2">
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="2*"/>
                     <ColumnDefinition Width="2*"/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                     <RowDefinition Height="*"/>
                     <RowDefinition Height="*"/>
                     <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>

                  <TextBlock Name="CornerCutsTxBl" Grid.Row="0" Grid.ColumnSpan="2"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                  <CheckBox Name="CornerCutsChBx" Grid.Row="0" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
                     HorizontalAlignment="Right" Margin="0,0,10,0"/>

                  <TextBlock Name="InternalCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
                  <CheckBox Name="InternalCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
                     HorizontalAlignment="Right" Margin="0,0,10,0"/>

                  <TextBlock Name="ShortTxBl" Grid.Column="0" Grid.Row="2"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                  <EgtWPFLib:EgtTextBox Name="ShortTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
                     Style="{DynamicResource OmagCut_CalculatorTextBox}"/>

               </Grid>

            </GroupBox>

            <GroupBox Name="WjsParamGpBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="1" 
               Style="{DynamicResource OmagCut_GroupBox}">
               <Grid Grid.Column="3" Grid.Row="2">
                  <Grid.ColumnDefinitions>
                     <ColumnDefinition Width="2*"/>
                     <ColumnDefinition Width="2*"/>
                  </Grid.ColumnDefinitions>
                  <Grid.RowDefinitions>
                     <RowDefinition Height="*"/>
                  </Grid.RowDefinitions>

                  <TextBlock Name="WjIntCutsTxBl" Grid.Row="1" Grid.ColumnSpan="2"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Margin="10,0,0,10" VerticalAlignment="Bottom" />
               <CheckBox Name="WjIntCutsChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
                     HorizontalAlignment="Right" Margin="0,0,10,0"/>
               </Grid>
            </GroupBox>

         </Grid>-->

            <GroupBox Name="MaterialsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0"
            Grid.Row="3" Grid.ColumnSpan="1" Grid.RowSpan="5">

                <Grid>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="2.5*"/>
                        <RowDefinition Height="0.5*"/>
                        <RowDefinition Height="1*"/>
                    </Grid.RowDefinitions>

                    <ListBox Name="MaterialsLstBx" Grid.RowSpan="2">
                        <ListBox.ItemTemplate>
                            <DataTemplate>
                                <TextBlock Text="{Binding sName}" Style="{StaticResource OmagCut_LowerCaseCharacterTextBlock}"/>
                            </DataTemplate>
                        </ListBox.ItemTemplate>
                    </ListBox>

                    <EgtWPFLib:EgtTextBox Name="MatNameTxBx" Grid.Row="1" Width="240" Visibility="Hidden"
                  Style="{DynamicResource OmagCut_KeyboardTextBox}" />

                    <UniformGrid Grid.Row="2" Columns="2">
                        <Button Name="NewMatBtn" Grid.Column="1"
                     Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
                        <Button Name="RemoveMatBtn" Grid.Column="1"
                     Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>
                    </UniformGrid>

                </Grid>

            </GroupBox>

            <GroupBox Name="MachiningsGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1"
                     Grid.Row="0" Grid.ColumnSpan="1" Grid.RowSpan="3">

                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*"/>
                        <ColumnDefinition Width="2*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="0.5*"/>
                        <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>

                    <TextBlock Name="CurrSawingTxBl" Grid.Column="0" Grid.Row="0"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                    <EgtWPFLib:EgtTextBox Name="CurrSawingTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_FixedTextBox}" />

                    <TextBlock Name="CurrDrillingTxBl" Grid.Column="0" Grid.Row="1"
               Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                    <EgtWPFLib:EgtTextBox Name="CurrDrillingTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
               Style="{DynamicResource OmagCut_FixedTextBox}" />

                    <TextBlock Name="CurrMillingTxBl" Grid.Column="0" Grid.Row="2"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                    <EgtWPFLib:EgtTextBox Name="CurrMillingTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_FixedTextBox}" />

                    <TextBlock Name="CurrPocketingTxBl" Grid.Column="0" Grid.Row="3"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                    <EgtWPFLib:EgtTextBox Name="CurrPocketingTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_FixedTextBox}" />

                    <TextBlock Name="CurrWaterJettingTxBl" Grid.Column="0" Grid.Row="4"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>

                    <Grid Grid.Column="1" Grid.Row="4">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="5*"/>
                            <ColumnDefinition Width="1.5*"/>
                        </Grid.ColumnDefinitions>
                        <EgtWPFLib:EgtTextBox Name="CurrWaterJettingTxBx" Grid.Column="0" Margin="10,0,5,0"
                                         Style="{DynamicResource OmagCut_FixedTextBox}" />
                        <EgtWPFLib:EgtTextBox Name="CurrWaterJettingQualityTxBx" Grid.Column="1" Margin="0,0,10,0"
                                         Style="{DynamicResource OmagCut_FixedTextBox}" />
                    </Grid>


                    <TextBlock Name="CurrDripSawingTxBl" Grid.Column="0" Grid.Row="5"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                    <EgtWPFLib:EgtTextBox Name="CurrDripSawingTxBx" Grid.Column="1" Grid.Row="5" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_FixedTextBox}" />

                    <TextBlock Name="CurrDripDrillingTxBl" Grid.Column="0" Grid.Row="6"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                    <EgtWPFLib:EgtTextBox Name="CurrDripDrillingTxBx" Grid.Column="1" Grid.Row="6" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_FixedTextBox}" />

                </Grid>

            </GroupBox>

            <!--<GroupBox Name="SawGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.RowSpan="2">
            <Grid>
               <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="2*"/>
                  <ColumnDefinition Width="2*"/>
               </Grid.ColumnDefinitions>
               <Grid.RowDefinitions>
                  <RowDefinition Height="0.5*"/>
                  <RowDefinition Height="0.5*"/>
                  <RowDefinition Height="0.5*"/>
                  <RowDefinition Height="0.5*"/>
                  <RowDefinition Height="0.5*"/>
               </Grid.RowDefinitions>

               <TextBlock Name="CutExtraLenTxBl" Grid.Column="0" Grid.Row="0"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
               <EgtWPFLib:EgtTextBox Name="CutExtraLenTxBx" Grid.Column="1" Grid.Row="0" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_CalculatorTextBox}" />

               <TextBlock Name="AngleCutExtraLenTxBl" Grid.Column="0" Grid.Row="1"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
               <EgtWPFLib:EgtTextBox Name="AngleCutExtraLenTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_CalculatorTextBox}" />

               <TextBlock Name="ExtArcMinRadTxBl" Grid.Column="0" Grid.Row="2"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
               <EgtWPFLib:EgtTextBox Name="ExtArcMinRadTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_CalculatorTextBox}"/>

               <TextBlock Name="IntArcMaxSideAngTxBl" Grid.Column="0" Grid.Row="3"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
               <EgtWPFLib:EgtTextBox Name="IntArcMaxSideAngTxBx" Grid.Column="1" Grid.Row="3" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_CalculatorTextBox}"/>

            </Grid>

         </GroupBox>-->

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

                <GroupBox Name="MachineParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="2">
                    <Grid Grid.Column="2" Grid.Row="1">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="2*"/>
                            <ColumnDefinition Width="2*"/>
                        </Grid.ColumnDefinitions>

                        <TextBlock Name="SafeZTxBl" Grid.Column="0"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                        <EgtWPFLib:EgtTextBox Name="SafeZTxBx" Grid.Column="1" Margin="10,0,10,0"
                     Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
                    </Grid>

                </GroupBox>

                <Border Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="0" Grid.Row="2" Grid.ColumnSpan="2" Grid.RowSpan="2">
                    <Grid >
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="2*"/>
                            <ColumnDefinition Width="2*"/>
                        </Grid.ColumnDefinitions>

                        <TextBlock Name="AdditionalTableTxBl" Grid.Column="0"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                        <EgtWPFLib:EgtTextBox Name="AdditionalTableTxBx" Grid.Column="1" Margin="10,0,10,0"
                     Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
                    </Grid>

                </Border>

            </Grid>

            <!--<GroupBox Name="DirectCutsParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="2" Grid.Row="8">
            <Grid>
               <TextBlock Name="FinalHomeTxBl"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
               <CheckBox Name="FinalHomeChBx" Style="{StaticResource OmagCut_CheckBox_Single}"
                  HorizontalAlignment="Right" Margin="0,0,10,0"/>
            </Grid>

         </GroupBox>-->

            <GroupBox Name="NestingParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="1" Grid.Row="6" Grid.RowSpan="3">
                <Grid Name="NestingGrid">
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*"/>
                        <ColumnDefinition Width="2*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="0.5*"/>
                        <RowDefinition Height="0.5*"/>
                        <RowDefinition Height="0.5*"/>
                        <RowDefinition Height="0.5*"/>
                    </Grid.RowDefinitions>

                    <TextBlock Name="CompleteCutsTxBl" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                    <CheckBox Name="CompleteCutsChBx" Grid.Column="0" Grid.Row="0" Grid.ColumnSpan="2" Style="{DynamicResource OmagCut_CheckBox_Single}"
                  HorizontalAlignment="Right" Margin="0,0,10,0"/>

                    <!--Allineato-->
                    <TextBlock Name="AlignTxBl" Grid.Row="1" Grid.ColumnSpan="2"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                    <CheckBox Name="AlignChBx" Grid.Row="1" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
                  HorizontalAlignment="Right" Margin="0,0,10,0"/>

                    <!--Ghigliottina-->
                    <TextBlock Name="GhigliottinaTxBl" Grid.Row="2" Grid.ColumnSpan="2"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                    <CheckBox Name="GhigliottinaChBx" Grid.Row="2" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
                  HorizontalAlignment="Right" Margin="0,0,10,0"/>

                    <!--Automatico-->
                    <TextBlock Name="AutomaticTxBl" Grid.Row="3" Grid.ColumnSpan="2"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                    <CheckBox Name="AutomaticChBx" Grid.Row="3" Grid.ColumnSpan="2" Style="{StaticResource OmagCut_CheckBox_Single}"
                  HorizontalAlignment="Right" Margin="0,0,10,0"/>



                </Grid>

            </GroupBox>

            <GroupBox Name="AutoRawImageParamGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="0" Grid.RowSpan="2">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*"/>
                        <ColumnDefinition Width="2*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="1*"/>
                        <RowDefinition Height="0.5*"/>
                        <RowDefinition Height="0.5*"/>
                    </Grid.RowDefinitions>

                    <Grid Grid.ColumnSpan="2">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="0.5*"/>
                            <ColumnDefinition Width="2*"/>
                            <ColumnDefinition Width="0.5*"/>
                        </Grid.ColumnDefinitions>

                        <Button Name="BackImageBtn" Grid.Column="1"
                  Style="{DynamicResource OmagCut_RightGrayGradientYellowTextButton}"/>

                    </Grid>

                    <TextBlock Name="ThresholdTxBl" Grid.Column="0" Grid.Row="1"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                    <EgtWPFLib:EgtTextBox Name="ThresholdTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
                    <TextBlock Name="ToleranceTxBl" Grid.Column="0" Grid.Row="2"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                    <EgtWPFLib:EgtTextBox Name="ToleranceTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_CalculatorTextBox}"/>

                </Grid>

            </GroupBox>

            <GroupBox Name="CutFredGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
            Grid.Row="2" Grid.RowSpan="1">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*"/>
                        <ColumnDefinition Width="2*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="0.5*"/>
                        <RowDefinition Height="0.5*"/>
                    </Grid.RowDefinitions>

                    <TextBlock Name="CfrLenTxBl" Grid.Column="0"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                    <EgtWPFLib:EgtTextBox Name="CfrLenTxBx" Grid.Column="1" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
                    <TextBlock Name="CfrPercTxBl" Grid.Column="0" Grid.Row="1"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                    <EgtWPFLib:EgtTextBox Name="CfrPercTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
                </Grid>

            </GroupBox>

            <!--Incisioni-->
            <GroupBox Name="TopMillGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3"
            Grid.Row="3" Grid.RowSpan="3">
                <Grid>
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*"/>
                        <ColumnDefinition Width="2*"/>
                    </Grid.ColumnDefinitions>
                    <Grid.RowDefinitions>
                        <RowDefinition Height="0.5*"/>
                        <RowDefinition Height="0.5*"/>
                        <RowDefinition Height="0.5*"/>
                    </Grid.RowDefinitions>

                    <!--Utilizza fresa-->
                    <TextBlock Name="TmEnableTxBl" Grid.Column="0" Grid.Row="0"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                    <CheckBox Name="TmEnableChBx" Grid.Column="1" Grid.Row="0" Style="{DynamicResource OmagCut_CheckBox_Single}"
                  HorizontalAlignment="Right" Margin="10,0,10,0"/>
                    <!--Affondamento-->
                    <TextBlock Name="TmDepthTxBl" Grid.Column="0" Grid.Row="1"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                    <EgtWPFLib:EgtTextBox Name="TmDepthTxBx" Grid.Column="1" Grid.Row="1" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
                    <!--Larghezza-->
                    <TextBlock Name="TmWidthTxBl" Grid.Column="0" Grid.Row="2"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                    <EgtWPFLib:EgtTextBox Name="TmWidthTxBx" Grid.Column="1" Grid.Row="2" Margin="10,0,10,0"
                  Style="{DynamicResource OmagCut_CalculatorTextBox}"/>
                </Grid>

            </GroupBox>


            <Border  Name="SideAngCutProbeGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="6">
                <Grid >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*"/>
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Name="SideAngCutProbeTxBl" Grid.Column="0" Grid.Row="0"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                    <CheckBox Name="SideAngCutProbeChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
                  HorizontalAlignment="Right" Margin="0,0,10,0"/>
                </Grid>

            </Border>

            <Border Name="WashingGpBx" Style="{DynamicResource OmagCut_NoNameGroupBorder}" Grid.Column="3" Grid.Row="7">
                <Grid >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*"/>
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Name="WashingTxBl" Grid.Column="0" Grid.Row="0"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                    <CheckBox Name="WashingChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
                  HorizontalAlignment="Right" Margin="0,0,10,0"/>
                </Grid>

            </Border>

            <!--Cornici-->
            <GroupBox Name="FrameGpBx" Style="{DynamicResource OmagCut_GroupBox}" Grid.Column="3" Grid.Row="8">
                <Grid >
                    <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="2*"/>
                        <ColumnDefinition Width="1*"/>
                    </Grid.ColumnDefinitions>

                    <TextBlock Name="FramePauseTxBl" Grid.Column="0" Grid.Row="0"
               Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                    <CheckBox Name="FramePauseChBx" Grid.Column="1" Grid.Row="0" Style="{StaticResource OmagCut_CheckBox_Single}"
               HorizontalAlignment="Right" Margin="0,0,10,0"/>
                </Grid>

            </GroupBox>

            <Grid Grid.Column="0" Grid.Row="8">
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="2.5*"/>
                    <ColumnDefinition Width="5*"/>
                    <ColumnDefinition Width="2*"/>
                </Grid.ColumnDefinitions>
                <Button x:Name="SawProbingBtn"
         	   Style="{DynamicResource OmagCut_YellowGradientYellowIconButton}">
                    <Image Source="{DynamicResource SawProbeImg}" Style="{StaticResource OmagCut_ScaleButtonIcon}"/>
                </Button>

                
                <TextBlock Name="UseLaserOriginTxBl" Grid.Column="1"
                  Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                <CheckBox Name="UseLaserOriginChBx" Style="{DynamicResource OmagCut_CheckBox_Single}" Grid.Column="2"
                  HorizontalAlignment="Right" Margin="10,0,10,0"/>
            </Grid>
            
        </Grid>
    </Border>

</UserControl>
