<UserControl x:Class="CustomGridUC"
             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"
             FontFamily="{DynamicResource OmagCut_Font}"
             Background="#636974">

   <Grid Name ="CustomGrid" Grid.Row="5" Grid.ColumnSpan="2">
      <Grid.RowDefinitions>
         <RowDefinition Height="Auto"/>
         <RowDefinition Height="Auto"/>
         <RowDefinition Height="2.5*"/>
         <RowDefinition Height="Auto"/>
      </Grid.RowDefinitions>
      <Grid.ColumnDefinitions>
         <ColumnDefinition Width="1*"/>
         <ColumnDefinition Width="1*"/>
      </Grid.ColumnDefinitions>

      <UniformGrid Grid.Row="0"
                   Grid.ColumnSpan="2"
                   Columns="4"
                   Margin="2,2,0,2">
         <Button Name="AddCutBtn" Content="+" 
                 Style="{DynamicResource OmagCut_YellowTextButton}"
                 Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
         <Button Name="RemoveCutBtn" Content="-" 
                 Style="{DynamicResource OmagCut_YellowTextButton}"
                 Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
         <ToggleButton Name="Cut_XTgBtn" Content="X"
                       Style="{DynamicResource OmagCut_YellowToggleButton}"
                       Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
         <ToggleButton Name="Cut_YTgBtn" Content="Y"
                       Style="{DynamicResource OmagCut_YellowToggleButton}"
                       Width="40" Height="40" HorizontalAlignment="Left" Margin="2,0,0,0"/>
      </UniformGrid>

      <TextBlock Name="NumPzXTxBl" Grid.Column="0" Grid.Row="1" HorizontalAlignment="Center"
                 Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>
      <TextBlock Name="DimPzXTxBl" Grid.Column="1" Grid.Row="1" HorizontalAlignment="Center"
                 Style="{StaticResource OmagCut_CurrProjSummeryTextBlock}"/>

      <ScrollViewer Background="Transparent" Grid.Row="2"  
                    Grid.ColumnSpan="2"
                    VerticalScrollBarVisibility="Auto" HorizontalScrollBarVisibility="Hidden">
         <ListBox Name="CustomGridLstBx" ScrollViewer.CanContentScroll="False">
            <ItemsControl.ItemsPanel>
               <ItemsPanelTemplate>
                  <StackPanel Orientation="Vertical"/>
               </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
               <DataTemplate>
                  <Grid Width="210">
                     <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="5*"/>
                        <ColumnDefinition Width="1*"/>
                        <ColumnDefinition Width="5*"/>
                     </Grid.ColumnDefinitions>
                     <EgtWPFLib:EgtTextBox Text="{Binding sNumber}" Grid.Column="0"
                                           Style="{StaticResource OmagCut_CalculatorTextBox}"/>
                     <EgtWPFLib:EgtTextBox Text="{Binding sInteraxis}" Grid.Column="2"
                                           Style="{StaticResource OmagCut_CalculatorTextBox}"/>
                  </Grid>
               </DataTemplate>
            </ItemsControl.ItemTemplate>
         </ListBox>
      </ScrollViewer>
      <UniformGrid Grid.Row="3"
                   Grid.ColumnSpan="2"
                   Columns="2"
                   Margin="0,2,0,2">
         <Button Name="UpdateBtn" 
                 Style="{DynamicResource OmagCut_YellowTextButton}"/>
         <Button Name="ExitBtn" Grid.Row="2" Style="{DynamicResource OmagCut_YellowIconButton}">
            <Image Source="{DynamicResource XImg}" Style="{StaticResource OmagCut_ButtonIcon}"/>
         </Button>
      </UniformGrid>
   </Grid>
</UserControl>
