<UserControl x:Class="MDIPageV"
             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">
   <Grid>
      <Grid.RowDefinitions>
         <RowDefinition Height="1*"/>
         <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>

      <EgtBEAMWALLCORE:EgtDataGrid ItemsSource="{Binding MDICommandList}"
                                   SelectedItem="{Binding SelMDICommand}"
                                   AutoGenerateColumns="False"
                                   CanUserDeleteRows="False"
                                   CanUserResizeRows="False"
                                   SelectionMode="Single"
                                   ScrollViewer.CanContentScroll="True" 
                                   ScrollViewer.VerticalScrollBarVisibility="Auto"
                                   ScrollViewer.HorizontalScrollBarVisibility="Auto"
                                   Margin="0,0,0,5"
                                   BindingColumns="{Binding MDICommandColumns}"
                                   Style="{StaticResource DataGrid_CustomHighLight}">
         <DataGrid.Resources>
            <!-- Command -->
            <DataGridTextColumn x:Key="colCOMMAND" Binding="{Binding sCommand}">
               <DataGridTextColumn.HeaderTemplate>
                  <DataTemplate>
                     <TextBlock Text="{Binding Path=DataContext.Command_Msg,
                                               RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:MDIPageV}}}"/>
                  </DataTemplate>
               </DataGridTextColumn.HeaderTemplate>
            </DataGridTextColumn>
            <!-- Descrizione -->
            <DataGridTextColumn x:Key="colDESCRIPTION" Binding="{Binding sDescription}">
               <DataGridTextColumn.HeaderTemplate>
                  <DataTemplate>
                  <TextBlock Text="{Binding Path=DataContext.Description_Msg,
                                            RelativeSource={RelativeSource AncestorType={x:Type EgtBEAMWALL:MDIPageV}}}"/>
                  </DataTemplate>
               </DataGridTextColumn.HeaderTemplate>
            </DataGridTextColumn>
         </DataGrid.Resources>

      </EgtBEAMWALLCORE:EgtDataGrid>

      <Grid Grid.Row="1">
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="1*"/>
            <ColumnDefinition Width="Auto"/>
         </Grid.ColumnDefinitions>
         <TextBox Text="{Binding sMDICommand_Text, UpdateSourceTrigger=PropertyChanged}"
                  Background="{Binding MDIText_Background}"
                  VerticalAlignment="Center"
                  CharacterCasing="Upper"
                  Margin="5,0,2.5,0"/>
         <Button Grid.Column="1"
                 Command="{Binding SendMDI_Command}"
                 Margin="2.5,0,5,0"
                 Style="{StaticResource ToolBar_SmallButton}">
            <Image Source="/Resources/MDIPage/Send.png" Stretch="Uniform"/>
         </Button>
      </Grid>
   </Grid>

</UserControl>
