<Window x:Class="ChangeToolWD"
        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}"
        Title="ChooseTool" Height="382.6" Width="426.6" WindowStyle="None" 
        ResizeMode="NoResize" ShowInTaskbar="False" AllowsTransparency="True" 
        Background="Transparent">

   <Border Style="{DynamicResource OmagCut_Border}">
      <Grid>
         <Grid.ColumnDefinitions>
            <ColumnDefinition Width="0.5*"/>
            <ColumnDefinition Width="4*"/>
            <ColumnDefinition Width="0.5*"/>
         </Grid.ColumnDefinitions>
         <Grid.RowDefinitions>
            <RowDefinition Height="0.5*"/>
            <RowDefinition Height="0.5*"/>
            <RowDefinition Height="1.5*"/>
            <RowDefinition Height="0.5*"/>
            <RowDefinition Height="0.5*"/>
            <RowDefinition Height="1*"/>
            <RowDefinition Height="0.5*"/>
         </Grid.RowDefinitions>

         <TextBlock Name="FilePathTxBl" Grid.Column="1" Grid.Row="0" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
         <!--TextAlignment="Center"
              FontSize="20"
              VerticalAlignment="Center"-->

         <Grid Grid.Column="1" Grid.Row="1">
            <Grid.ColumnDefinitions>
               <ColumnDefinition Width="0.8*"/>
               <ColumnDefinition Width="0.7*"/>
               <ColumnDefinition Width="0.7*"/>
            </Grid.ColumnDefinitions>
            <TextBlock Grid.Column="0" Text="MACHINING" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
            <TextBlock Grid.Column="1" Text="TOOL" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" />
            <TextBlock Grid.Column="2" Text="TC" Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}" Margin="10,0,0,0"/>
         </Grid>

         <ListBox Name="SetUpToolListBox" Grid.Column="1" Grid.Row="2"
                  ItemsSource="{Binding ItemList}">
            <ListBox.ItemTemplate>
               <DataTemplate>
                  <Grid Width="{Binding ActualWidth, ElementName=SetUpToolListBox}" Margin="0,0,-40,0">
                     <Grid.ColumnDefinitions>
                        <ColumnDefinition Width="0.8*"/>
                        <ColumnDefinition Width="0.7*"/>
                        <ColumnDefinition Width="0.4*"/>
                        <ColumnDefinition Width="0.0*"/>
                     </Grid.ColumnDefinitions>
                     <TextBlock Grid.Column="0" Text="{Binding Machining}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
                     <TextBlock Grid.Column="1" Text="{Binding ToolName}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
                     <TextBlock Grid.Column="2" Text="{Binding ToolPos}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
                     <Rectangle Grid.Column="2" Style="{DynamicResource Rect_SplitPage}" Margin="15,0,0,0"/>
                     <Grid.ToolTip>
                        <StackPanel>
                           <TextBlock Text="{Binding Machining}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
                           <TextBlock Text="{Binding ToolName}" Style="{DynamicResource OmagCut_ListBoxTextBlock}" />
                           <TextBlock Text="{Binding ToolPos}" Style="{DynamicResource OmagCut_ListBoxTextBlock}"/>
                        </StackPanel>
                     </Grid.ToolTip>
                  </Grid>
               </DataTemplate>
            </ListBox.ItemTemplate>
         </ListBox>

         <TextBlock Name="ErrorTxBl" Grid.Column="1" Grid.Row="3" 
                    Style="{DynamicResource OmagCut_ErrorTextBlock}"/>

         <Grid Grid.Column="1" Grid.Row="5">
            <Grid.ColumnDefinitions>
               <ColumnDefinition Width="0.5*"/>
               <ColumnDefinition Width="1*"/>
               <ColumnDefinition Width="1*"/>
               <ColumnDefinition Width="1*"/>
               <ColumnDefinition Width="0.5*"/>
            </Grid.ColumnDefinitions>
            <Button Name="OkBtn" Grid.Column="1" Style="{DynamicResource OmagCut_GradientBlueIconButton}" >
               <Image Source="{DynamicResource VImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
            </Button>
            <Button Name="ExitBtn" Grid.Column="3" Style="{DynamicResource OmagCut_GradientBlueIconButton}" IsCancel="True">
               <Image Source="{DynamicResource XImg}" Style="{DynamicResource OmagCut_ButtonIcon}"/>
            </Button>
         </Grid>

      </Grid>

   </Border>
</Window>
