<UserControl x:Class="FeatureInPartInRawPartListV"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:EgtBEAMWALL="clr-namespace:EgtBEAMWALL.ViewerOptimizer" 
             xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core">
   <!--<Grid>
      <Grid.RowDefinitions>
         <RowDefinition Height="1*"/>
         <RowDefinition Height="30"/>
         <RowDefinition Height="30"/>
      </Grid.RowDefinitions>-->
   <EgtBEAMWALLCORE:EgtDataGrid ItemsSource="{Binding Tag.FeatureVMList,
                                                       RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"
                                 SelectedItem="{Binding Tag.SelFeatureVM,
                                                        RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"
                                 CanUserAddRows="False"
                                 AutoGenerateColumns="False"
                                 CanUserResizeRows="False"
                                 SelectionMode="Single"
                                 ScrollViewer.CanContentScroll="True" 
                                 ScrollViewer.VerticalScrollBarVisibility="Auto"
                                 ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                 Margin="0,0,0,5"
                                 BindingColumns="{Binding FeatureInPartInRawPartColumns}"
                                 BeginningEdit="FeatureInPartInRawPartList_BeginningEdit"
                                 Style="{StaticResource DataGrid_CustomHighLight}">
      <DataGrid.InputBindings>
            <KeyBinding Key="Delete" Command="{Binding Tag.SelFeatureVM.DeleteFeature_Command,
                                   RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"/>
         </DataGrid.InputBindings>
         <DataGrid.Resources>
            <!--DO - Abilitazione-->
            <DataGridCheckBoxColumn x:Key="colDO" Binding="{Binding bDO,UpdateSourceTrigger=PropertyChanged}">
               <DataGridCheckBoxColumn.Header>
                  <TextBlock Text="{Binding Path=DataContext.DO_Msg,RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"/>
               </DataGridCheckBoxColumn.Header>
            </DataGridCheckBoxColumn>
            <!--Validità feature-->
            <DataGridTemplateColumn x:Key="colCALC">
            <DataGridTemplateColumn.CellTemplate>
               <DataTemplate>
                  <Grid>
                     <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="1*"/>
                        <ColumnDefinition Width="10"/>
                     </Grid.ColumnDefinitions>
                     <Border Width="{Binding ActualHeight, RelativeSource={RelativeSource self}}"
                             Background="{Binding Calc_Background}"/>
                     <!--Width="{Binding ActualHeigth, Source=Self}"/>-->
                     <Grid Grid.Column="1"
                           HorizontalAlignment="Center">
                        <Grid.RowDefinitions>
                           <RowDefinition Height="1*"/>
                           <RowDefinition Height="Auto"/>
                        </Grid.RowDefinitions>
                        <Ellipse Width="5"
                                 Height="5"
                                 Fill="Red"
                                 Visibility="{Binding CALC_ROT_Visibility}"
                                 HorizontalAlignment="Center"/>
                        <TextBlock Grid.Row="1"
                                   Text="{Binding CALC_ERR_Letter}"
                                   Foreground="{Binding CALC_ERR_Foreground}"
                                   TextAlignment="Center"
                                   FontWeight="Bold"
                                   FontSize="12"
                                   Margin="0,-6,0,-2"/>
                        <!--<Ellipse Width="5"
                                 Height="5"
                                 Fill="Red"
                                 Visibility="{Binding CALC_ROT_Visibility}"/>
                        <TextBlock Text="{Binding CALC_ERR_Letter}"
                                   Foreground="{Binding CALC_ERR_Foreground}"
                                   FontWeight="Bold"
                                   FontSize="10"/>-->
                        <!--<TextBlock Text="&#x2794;"
                                   Visibility="{Binding CALC_FALL_Visibility}"/>-->
                     </Grid>
                  </Grid>
               </DataTemplate>
            </DataGridTemplateColumn.CellTemplate>
         </DataGridTemplateColumn>
            <!--Descrizione-->
            <DataGridTextColumn x:Key="colDESC" Binding="{Binding sDesc}">
               <DataGridTextColumn.Header>
                  <TextBlock Text="{Binding Path=DataContext.Description_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"/>
               </DataGridTextColumn.Header>
            </DataGridTextColumn>
         <!--Descrizione-->
         <DataGridTextColumn x:Key="colPRIORITY" Binding="{Binding sPriority}">
            <DataGridTextColumn.Header>
               <TextBlock Text="{Binding Path=DataContext.Priority_Msg, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"/>
            </DataGridTextColumn.Header>
         </DataGridTextColumn>
      </DataGrid.Resources>

      </EgtBEAMWALLCORE:EgtDataGrid>
      <!--<TextBlock Grid.Row="1"
                 Text="{Binding Tag.sCALC_MSG, 
                                RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"/>
      <TextBlock Grid.Row="2"
                 Text="{Binding Tag.SelFeatureVM.sCALC_MSG, RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:FeatureInPartInRawPartListV}}}"
                 Margin="5,0,5,0"/>
   </Grid>-->
</UserControl>
