<Grid x:Class="PartManagerV"
            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
            xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
            xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.ViewerOptimizer"
            Height="32"
            IsEnabled="{Binding PartManager_IsEnabled}">
   <StackPanel Orientation="Horizontal">
      <TextBlock Text="BTL Qty"
                 Style="{StaticResource OptionTextBlock}"/>
      <TextBlock Text="{Binding Tag.sCNT,
                                RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}},
                                UpdateSourceTrigger=Explicit}"
                 Width="25"
                 Style="{StaticResource OptionTextBlock}"/>
      <TextBlock Text="Added Qty"
                 Style="{StaticResource OptionTextBlock}"/>
      <EgtWPFLib5:EgtTextBox Text="{Binding Tag.sADDED,
                                            RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}},
                                            UpdateSourceTrigger=Explicit}"
                             Width="25"/>
      <TextBlock Text="W"
                 Style="{StaticResource OptionTextBlock}"/>
      <EgtWPFLib5:EgtTextBox Text="{Binding Tag.sW, 
                                            RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}},
                                            UpdateSourceTrigger=Explicit}" Width="45"/>
      <TextBlock Text="H"
                 Style="{StaticResource OptionTextBlock}"/>
      <EgtWPFLib5:EgtTextBox Text="{Binding Tag.sH, 
                                            RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}},
                                            UpdateSourceTrigger=Explicit}" Width="45"/>
      <TextBlock Text="L"
                 Style="{StaticResource OptionTextBlock}"/>
      <EgtWPFLib5:EgtTextBox Text="{Binding Tag.sL,
                                            RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}},
                                            UpdateSourceTrigger=Explicit}" Width="65"/>
      <TextBlock Text="Inverti"
                 Style="{StaticResource OptionTextBlock}"
                 Margin="10,0,0,0"/>
      <Image IsEnabled="{Binding Tag.bLockInversion,
                                 RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}}}"
             Height="15"
             Stretch="Uniform"
             Visibility="{Binding Lock_Visibility}"
             Style="{StaticResource LockImage}"/>

      <Button Command="{Binding Tag.Invert_Command,
                                RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}}}"
              Style="{StaticResource ToolBar_SmallButton}"
              Margin="5,0,0,0">
         <Image Source="/Resources/PartManager/LeftInvert.png" Stretch="Uniform"/>
      </Button>
      <TextBlock Text="{Binding Tag.sINVERTED,
                                RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}}}"
                 TextAlignment="Center"
                 Width="25"
                 Style="{StaticResource OptionTextBlock}"/>
      <Button Command="{Binding Tag.Invert_Command,
                                RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}}}"
              Style="{StaticResource ToolBar_SmallButton}"
              Margin="0,0,5,0">
         <Image Source="/Resources/PartManager/RightInvert.png" Stretch="Uniform"/>
      </Button>
      <TextBlock Text="Ruota"
                 Style="{StaticResource OptionTextBlock}"
                 Margin="10,0,0,0"/>
      <Image IsEnabled="{Binding Tag.bLockRotation,
                                 RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}}}"
             Height="15"
             Stretch="Uniform"
             Visibility="{Binding Lock_Visibility}"
             Style="{StaticResource LockImage}"/>

      <Button Command="{Binding Tag.BackRotation_Command, 
                                RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}}}"
              Style="{StaticResource ToolBar_SmallButton}"
              Margin="5,0,0,0">
         <Image Source="/Resources/PartManager/LeftRotate.png" Stretch="Uniform"/>
      </Button>
      <TextBlock Text="{Binding Tag.sROTATED,
                                RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}}}"
                 TextAlignment="Center"
                 Width="25"
                 Style="{StaticResource OptionTextBlock}"/>
      <Button Command="{Binding Tag.ForwardRotation_Command,
                                RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}}}"
              Style="{StaticResource ToolBar_SmallButton}"
              Margin="0,0,10,0">
         <Image Source="/Resources/PartManager/RightRotate.png" Stretch="Uniform"/>
      </Button>

      <!--Comando inutilizzato ma conservato per eventuale rotazione a causa di importazione con rotazione sbagliata-->
      <!--<Button Command="{Binding Tag.XRotation_Command,
                             RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}}}"
           Style="{StaticResource ToolBar_SmallButton}"
           Margin="0,0,10,0">
      <Image Source="/Resources/PartManager/RightRotate.png" Stretch="Uniform"/>
   </Button>-->
      <TextBlock Text="{Binding Tag.sNAM,
                                RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}}}"
                 Style="{StaticResource OptionTextBlock}"/>
   </StackPanel>
   <StackPanel Orientation="Horizontal"
               HorizontalAlignment="Right"
               FlowDirection="RightToLeft">
      <TextBlock Text="{Binding Tag.sUnitTime,
                                UpdateSourceTrigger=PropertyChanged,
                                RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:PartManagerV}}}"
                 Width="45"
                 Style="{StaticResource OptionTextBlock}"/>
      <Image Source="/Resources/PartManager/Clock.png" 
             Stretch="Uniform"
             Height="15"/>
   </StackPanel>

</Grid>
