<UserControl x:Class="ToolsDbPageUC"
   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"
   xmlns:self="clr-namespace:OmagCUT.TreeViewItem"
   mc:Ignorable="d" 
   d:DesignHeight="768" d:DesignWidth="1280" Initialized="ToolsDbPage_Initialized" Loaded="ToolsDbPage_Loaded">

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

      <Grid Name="ToolsDbPageGrid" >
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="3*"/>
            <ColumnDefinition Width="8*"/>
            <ColumnDefinition Width="4*"/>
         </Grid.ColumnDefinitions>
         <Grid.RowDefinitions>
            <RowDefinition Height="8*"/>
            <RowDefinition Height="1*"/>
         </Grid.RowDefinitions>

         <TreeView Name="ToolTreeView" Background="{DynamicResource OmagCut_TreeViewBackGroundColor}" >
            <TreeView.Resources>
                    <!--Modifico HierarchicalDataTemplate del CathegoryItem per poter inserire immagine e testo e per -->
               <!--renderlo apribile con un solo click -->
               <HierarchicalDataTemplate DataType="{x:Type self:CathegoryItem}" ItemsSource="{Binding Items}">

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

                     <Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Width="32" Margin="0,8,6,4" />
                     <TextBlock Grid.Column="1" Text="{Binding Name}" FontSize="15" Margin="10" />

                  </Grid>

                  <!--Assegna ai nodi ToolItem lo Style normale dei TreeViewItem, eliminando l'ombra, data dal -->
                  <!-- multibinding quando sono attivi.-->
                  <HierarchicalDataTemplate.ItemContainerStyle>
                     <Style TargetType="{x:Type TreeViewItem}" >
                        <Setter Property="Foreground" Value="{DynamicResource OmagCut_TreeViewTextColor}" />
                        <Setter Property="IsSelected" Value="{Binding IsSelected}" />
                        <Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
                        <Setter Property="Template">
                           <Setter.Value>
                              <ControlTemplate TargetType="{x:Type TreeViewItem}">
                                 <Grid>
                                    <Grid.ColumnDefinitions>
                                       <ColumnDefinition MinWidth="19" Width="Auto"/>
                                       <ColumnDefinition Width="Auto"/>
                                       <ColumnDefinition Width="*"/>
                                    </Grid.ColumnDefinitions>
                                    <Grid.RowDefinitions>
                                       <RowDefinition Height="Auto"/>
                                       <RowDefinition/>
                                    </Grid.RowDefinitions>
                                    <ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
                                    <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                                       <ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                                    </Border>
                                    <ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
                                    <Rectangle Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" VerticalAlignment="Top" Fill="{DynamicResource OmagCut_TreeViewDelimiterColor}" Height="1" />
                                 </Grid>
                                 <ControlTemplate.Triggers>
                                    <Trigger Property="IsExpanded" Value="false">
                                       <Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
                                    </Trigger>
                                    <Trigger Property="HasItems" Value="false">
                                       <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
                                    </Trigger>
                                    <Trigger Property="IsSelected" Value="true">
                                       <Setter Property="Background" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBackground}"/>
                                       <Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBorder}"/>
                                       <Setter Property="BorderThickness" TargetName="Bd" Value="1"/>
                                       <!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
                                    </Trigger>
                                    <!--<MultiTrigger>
                                       <MultiTrigger.Conditions>
                                          <Condition Property="IsSelected" Value="true"/>
                                          <Condition Property="IsSelectionActive" Value="false"/>
                                       </MultiTrigger.Conditions>
                                       <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                                       <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                                    </MultiTrigger>-->
                                    <Trigger Property="IsEnabled" Value="false">
                                       <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                                    </Trigger>
                                 </ControlTemplate.Triggers>
                              </ControlTemplate>
                           </Setter.Value>
                        </Setter>
                     </Style>
                  </HierarchicalDataTemplate.ItemContainerStyle>
               </HierarchicalDataTemplate>
               <!--Modifico DataTemplate del ToolItem per poter inserire immagine e testo-->
               <DataTemplate DataType="{x:Type self:CustomItem}">
                  <Grid >
                     <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="Auto"/>
                        <ColumnDefinition Width="1*"/>
                     </Grid.ColumnDefinitions>

                     <!--<Image Grid.Column="0" Source="{Binding PictureString}" Height="32" Margin="0,8,6,4" />-->
                     <TextBlock Grid.Column="1" Text="{Binding Name}" Height="18" FontSize="15"  Margin="10"/>

                  </Grid>
               </DataTemplate>
            </TreeView.Resources>

            <!--Style dei nodi CathegoryItem che li riquadra di azzurro quando clicckati ed elimina l'ombra grigia -->
            <!--che si presenta quando la categoria rimane vuota (ombra causata dal multibinding). -->
            <TreeView.ItemContainerStyle>
               <Style TargetType="{x:Type TreeViewItem}">
                  <Setter Property="Foreground" Value="{DynamicResource OmagCut_TreeViewTextColor}" />
                  <Setter Property="IsSelected" Value="{Binding IsSelected}" />
                  <Setter Property="IsExpanded" Value="{Binding IsExpanded}" />
                  <Setter Property="Template">
                     <Setter.Value>
                        <ControlTemplate TargetType="{x:Type TreeViewItem}">
                           <Grid>
                              <Grid.ColumnDefinitions>
                                 <ColumnDefinition MinWidth="19" Width="Auto"/>
                                 <ColumnDefinition Width="Auto"/>
                                 <ColumnDefinition Width="*"/>
                              </Grid.ColumnDefinitions>
                              <Grid.RowDefinitions>
                                 <RowDefinition Height="Auto"/>
                                 <RowDefinition/>
                              </Grid.RowDefinitions>
                              <Border x:Name="ExpanderBorder" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                                 <ToggleButton x:Name="Expander" ClickMode="Press" IsChecked="{Binding IsExpanded, RelativeSource={RelativeSource TemplatedParent}}" Style="{StaticResource ExpandCollapseToggleStyle}"/>
                              </Border>
                              <Border x:Name="Bd" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" Grid.Column="1" Padding="{TemplateBinding Padding}" SnapsToDevicePixels="true">
                                 <ContentPresenter x:Name="PART_Header" ContentSource="Header" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
                              </Border>
                              <ItemsPresenter x:Name="ItemsHost" Grid.ColumnSpan="2" Grid.Column="1" Grid.Row="1"/>
                              <Rectangle Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="4" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Fill="{DynamicResource OmagCut_TreeViewDelimiterColor}" Height="1" />
                           </Grid>
                           <ControlTemplate.Triggers>
                              <Trigger Property="IsExpanded" Value="false">
                                 <Setter Property="Visibility" TargetName="ItemsHost" Value="Collapsed"/>
                              </Trigger>
                              <Trigger Property="HasItems" Value="false">
                                 <Setter Property="Visibility" TargetName="Expander" Value="Hidden"/>
                              </Trigger>
                              <Trigger Property="IsSelected" Value="true">
                                 <Setter Property="Background" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBackground}"/>
                                 <Setter Property="BorderBrush" TargetName="Bd" Value="{DynamicResource OmagCut_TreeViewSelectedItemBorder}"/>
                                 <Setter Property="BorderThickness" TargetName="Bd" Value="0,1,1,1"/>
                                 <Setter Property="Background" TargetName="ExpanderBorder" Value="{DynamicResource OmagCut_TreeViewSelectedItemBackground}"/>
                                 <Setter Property="BorderBrush" TargetName="ExpanderBorder" Value="{DynamicResource OmagCut_TreeViewSelectedItemBorder}"/>
                                 <Setter Property="BorderThickness" TargetName="ExpanderBorder" Value="1,1,0,1"/>
                                 <!--<Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.HighlightTextBrushKey}}"/>-->
                              </Trigger>
                              <!--<MultiTrigger>
                                 <MultiTrigger.Conditions>
                                    <Condition Property="IsSelected" Value="true"/>
                                    <Condition Property="IsSelectionActive" Value="false"/>
                                 </MultiTrigger.Conditions>
                                 <Setter Property="Background" TargetName="Bd" Value="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"/>
                                 <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
                              </MultiTrigger>-->
                              <Trigger Property="IsEnabled" Value="false">
                                 <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.GrayTextBrushKey}}"/>
                              </Trigger>
                           </ControlTemplate.Triggers>
                        </ControlTemplate>
                     </Setter.Value>
                  </Setter>
               </Style>
            </TreeView.ItemContainerStyle>
         </TreeView>

         <!-- Definizione della Grid dei parametri utensile -->
         <Grid Grid.Column="1">
            <Grid.ColumnDefinitions>
               <ColumnDefinition Width="2*"/>
               <ColumnDefinition Width="2*"/>
               <ColumnDefinition Width="2*"/>
               <ColumnDefinition Width="2*"/>
            </Grid.ColumnDefinitions>
            <Grid.RowDefinitions>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
               <RowDefinition Height="0.25*"/>
            </Grid.RowDefinitions>

            <TextBlock Name="NameTxBl" Grid.Column="0" Grid.Row="0" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
            <EgtWPFLib:EgtTextBox Name="NameTxBx" Grid.Column="1" Grid.Row="0" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"/>

            <Border Name="TCPosBrd" Grid.Column="2" Grid.Row="0" Grid.ColumnSpan="2" Grid.RowSpan="3"
               BorderThickness="0" BorderBrush="Black" CornerRadius="3">

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

                  <TextBlock Name="TCPosTxBl" Grid.Column="0"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                  <EgtWPFLib:EgtTextBox Name="TCPosTxBx" Grid.Column="1" Grid.Row="0" Margin="0,0,15,0"
                     Style="{DynamicResource OmagCut_KeyboardTextBox}" />

               </Grid>

            </Border>

            <Border Name="HeadExitBrd" Grid.Column="0" Grid.Row="3" Grid.ColumnSpan="4" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_NoNameGroupBorder}">

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

                  <TextBlock Name="HeadTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                  <EgtWPFLib:EgtTextBox Name="HeadTxBx" Grid.Column="1"
                     Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}" />

                  <TextBlock Name="ExitTxBl" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                  <EgtWPFLib:EgtTextBox Name="ExitTxBx" Grid.Column="3"
                     Style="{DynamicResource OmagCut_RightCalculatorTextBoxInBorder}" />

               </Grid>

            </Border>

            <GroupBox Name="SpeedGpBx" Grid.Column="0" Grid.Row="6" Grid.ColumnSpan="4" Grid.RowSpan="4"
               Style="{DynamicResource OmagCut_GroupBox}">

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

                  <TextBlock Name="SpeedTxBl" Grid.Column="0" Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                  <EgtWPFLib:EgtTextBox Name="SpeedTxBx" Grid.Column="1"
                     Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />

                  <TextBlock Name="MaxSpeedTxBl" Grid.Column="2"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                  <EgtWPFLib:EgtTextBox Name="MaxSpeedTxBx" Grid.Column="3"
                     Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />

               </Grid>

            </GroupBox>

            <GroupBox Name="FeedGpBx" Grid.Column="0" Grid.Row="10" Grid.ColumnSpan="4" Grid.RowSpan="6"
               Style="{DynamicResource OmagCut_GroupBox}">

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

                  <TextBlock Name="FeedTxBl" Grid.Column="0" Grid.Row="0"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                  <EgtWPFLib:EgtTextBox Name="FeedTxBx" Grid.Column="1" Grid.Row="0"
                     Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />

                  <TextBlock Name="TipFeedTxBl" Grid.Column="2" Grid.Row="0"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                  <EgtWPFLib:EgtTextBox Name="TipFeedTxBx" Grid.Column="3" Grid.Row="0"
                     Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />

                  <TextBlock Name="StartFeedTxBl" Grid.Column="0" Grid.Row="1"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                  <EgtWPFLib:EgtTextBox Name="StartFeedTxBx" Grid.Column="1" Grid.Row="1"
                     Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />
                  <TextBlock Name="EndFeedTxBl" Grid.Column="2" Grid.Row="1"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                  <EgtWPFLib:EgtTextBox Name="EndFeedTxBx" Grid.Column="3" Grid.Row="1"
                     Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />

               </Grid>

            </GroupBox>

            <TextBlock Name="CoolantTxBl" Grid.Column="0" Grid.Row="16" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
            <ComboBox Name="CoolantCmBx" Grid.Column="1" Grid.Row="16" Grid.RowSpan="3" Style="{StaticResource OmagCut_LeftComboBoxNoBorder}">
               <ComboBox.ItemTemplate>
                  <DataTemplate>
                            <TextBlock Text="{Binding}" Style="{DynamicResource OmagCut_LowerCaseCharacterTextBlock}"/>
                  </DataTemplate>
               </ComboBox.ItemTemplate>
            </ComboBox>

            <TextBlock Name="CorrTxBl" Grid.Column="2" Grid.Row="16" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
            <EgtWPFLib:EgtTextBox Name="CorrTxBx" Grid.Column="3" Grid.Row="16" Grid.RowSpan="3" Margin="0,0,15,0"
               Style="{DynamicResource OmagCut_CalculatorTextBox}" />

            <GroupBox Name="OffsetGpBx" Grid.Column="0" Grid.Row="19" Grid.ColumnSpan="4" Grid.RowSpan="4"
               Style="{DynamicResource OmagCut_GroupBox}">

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

                  <TextBlock Name="RadOffsetTxBl" Grid.Column="0"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                  <EgtWPFLib:EgtTextBox Name="RadOffsetTxBx" Grid.Column="1"
                     Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />

                  <TextBlock Name="LonOffsetTxBl" Grid.Column="2"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
                  <EgtWPFLib:EgtTextBox Name="LonOffsetTxBx" Grid.Column="3"
                     Style="{DynamicResource OmagCut_CalculatorTextBoxInGroupBox}" />

               </Grid>

            </GroupBox>

            <Border Name="AbsorptionBrd" Grid.Column="0" Grid.Row="23" Grid.ColumnSpan="4" Grid.RowSpan="4"
               Style="{DynamicResource OmagCut_NoNameGroupBorder}" Margin="0,2,0,0">

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

                  <TextBlock Name="MaxAbsorptionTxBl" Grid.Column="0"
                     Style="{DynamicResource OmagCut_ToolsDBTextBlock}" Grid.ColumnSpan="1" ScrollViewer.VerticalScrollBarVisibility="Disabled" TextWrapping="Wrap"/>
                  <EgtWPFLib:EgtTextBox Name="MaxAbsorptionTxBx" Grid.Column="1" 
                     Style="{DynamicResource OmagCut_LeftCalculatorTextBoxInBorder}" />

                  <TextBlock Name="MinFeedTxBl" Grid.Column="2" Style="{DynamicResource OmagCut_ToolsDBTextBlock}" />
                  <EgtWPFLib:EgtTextBox Name="MinFeedTxBx" Grid.Column="3"
                     Style="{DynamicResource OmagCut_RightCalculatorTextBoxInBorder}" />

               </Grid>

            </Border>

            <TextBlock Name="MaxMatTxBl" Grid.Column="0" Grid.Row="27" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
            <EgtWPFLib:EgtTextBox Name="MaxMatTxBx" Grid.Column="1" Grid.Row="27" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_LeftCalculatorTextBoxNoBorder}" />

            <TextBlock Name="SerNbrTxBl" Grid.Column="0" Grid.Row="29" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
            <EgtWPFLib:EgtTextBox Name="SerNbrTxBx" Grid.Column="1" Grid.Row="29" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}" />

            <TextBlock Name="CodeTxBl" Grid.Column="2" Grid.Row="29" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
            <EgtWPFLib:EgtTextBox Name="CodeTxBx" Grid.Column="3" Grid.Row="29" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}"  Margin="0,0,15,0"/>

            <TextBlock Name="SupplierTxBl" Grid.Column="0" Grid.Row="31" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
            <EgtWPFLib:EgtTextBox Name="SupplierTxBx" Grid.Column="1" Grid.Row="31" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_LeftKeyboardTextBoxNoBorder}" />

            <TextBlock Name="EndLifeTxBl" Grid.Column="2" Grid.Row="31" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
            <CheckBox Name="EndLifeChBx" Grid.Column="3" Grid.Row="31" Grid.RowSpan="3"
                Style="{StaticResource OmagCut_CheckBox_Single}" Margin="0,8,0,0"/>

            <TextBlock Name="UserNotesTxBl" Grid.Column="0" Grid.Row="33" Grid.RowSpan="3"
               Style="{DynamicResource OmagCut_ToolsDBTextBlock}"/>
            <EgtWPFLib:EgtTextBox Name="UserNotesTxBx" Grid.Column="1" Grid.Row="33"
               Grid.RowSpan="3"  Grid.ColumnSpan="3" Margin="0,0,15,0" 
               Style="{DynamicResource OmagCut_KeyboardTextBox}"/>

         </Grid>

         <!-- Definizione della Grid inferiore per Button -->
         <Grid Name="LowerButtonGrid" Grid.Column="0" Grid.ColumnSpan="3" Grid.Row="2">
            <Grid.ColumnDefinitions>
               <ColumnDefinition Width="1*"/>
               <ColumnDefinition Width="1*"/>
               <ColumnDefinition Width="1*"/>
               <ColumnDefinition Width="10*"/>
               <ColumnDefinition Width="1*"/>
               <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>

            <Button Name="NewBtn" Grid.Column="0" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
            <Button Name="SaveBtn" Grid.Column="1" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}"/>
            <Button Name="RemoveBtn" Grid.Column="2" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
            <Button Name="ExportBtn" Grid.Column="4" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>
            <Button Name="ImportBtn" Grid.Column="5" Style="{DynamicResource OmagCut_YellowGradientYellowTextButton}" Padding="0"/>

            </Grid>

      </Grid>

   </Border>

</UserControl>
