<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.Supervisor"
             xmlns:EgtBEAMWALLCORE="clr-namespace:EgtBEAMWALL.Core;assembly=EgtBEAMWALL.Core">

   <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"
                                CanUserSortColumns="False"
                                CanUserResizeRows="False"
                                CanUserReorderColumns="False"
                                SelectionMode="Single"
                                ScrollViewer.CanContentScroll="True" 
                                ScrollViewer.VerticalScrollBarVisibility="Auto"
                                ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                Margin="0,0,0,5"
                                ColumnHeaderBackground="{DynamicResource {x:Static SystemColors.ControlBrushKey}}"
                                ColumnHeaderForeground="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"
                                ColumnHeaderFontWeight="Normal"
                                ColumnHeaderPadding="0,2,0,2"
                                BindingColumns="{Binding FeatureInPartInRawPartColumns}"
                                Style="{StaticResource DataGrid_CustomHighLight}">
      <DataGrid.Resources>
         <!--DO - Abilitazione-->
         <DataGridCheckBoxColumn x:Key="colREDO" 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}"/>
                     <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"/>
                     </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>
      </DataGrid.Resources>

   </EgtBEAMWALLCORE:EgtDataGrid>
</UserControl>
