<Window x:Class="SelectTableWD"
        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="282.6" Width="326.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.1*"/>
            <RowDefinition Height="1.0*"/>
            <RowDefinition Height="0.5*"/>
         </Grid.RowDefinitions>

         <TextBlock Name="TableListMsg" Grid.Row="1" Grid.Column="1" 
                    Style="{DynamicResource OmagCut_CenteredLowerCaseCharacterTextBlock}"/>

         <ItemsControl Name="TableList"
                       Grid.Row="2" Grid.Column="1">
            <ItemsControl.ItemsPanel>
               <ItemsPanelTemplate>
                  <StackPanel Orientation="Horizontal" 
                              HorizontalAlignment="Center"/>
               </ItemsPanelTemplate>
            </ItemsControl.ItemsPanel>
            <ItemsControl.ItemTemplate>
               <DataTemplate>
                  <RadioButton GroupName="TabGrp" 
                               IsChecked="{Binding IsActive}"
                               Width="60" Height="60">

                     <RadioButton.Style>
                        <Style TargetType="ToggleButton" BasedOn="{StaticResource OmagCut_ToggleButton}">
                           <Style.Triggers>
                              <Trigger Property="IsChecked" Value="True">
                                 <Setter Property="Foreground" Value="white"/>
                                 <Setter Property="Background" Value="{StaticResource OmagCut_Blue}"/>
                              </Trigger>
                           </Style.Triggers>
                        </Style>
                     </RadioButton.Style>
                     <Grid>
                        <TextBlock Text="{Binding sName}" Background="Transparent"/>
                        <Image Source="{Binding ImgTab}" Margin="0,10,0,0"
                               Style="{DynamicResource OmagCut_ButtonIcon}"/>
                     </Grid>

                  </RadioButton>
               </DataTemplate>
            </ItemsControl.ItemTemplate>
         </ItemsControl>

         <Grid Grid.Column="1" Grid.Row="4">
            <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>
