<EgtWPFLib5:EgtCustomWindow x:Class="OnlyProdEgtColorPickerV"
                            xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                            xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                            xmlns:EgtWPFLib5="clr-namespace:EgtWPFLib5;assembly=EgtWPFLib5"
                            Title="{Binding sTitle}"
                            WindowStartupLocation="CenterOwner"
                            SizeToContent="WidthAndHeight"
                            WindowStyle="None" ResizeMode="NoResize"
                            IsMinimizable="False" ShowInTaskbar="False"
                            Width="750" Height="450"
                            Style="{StaticResource OnlyProd_EgtCustomWindow}">
   
   <Grid Margin="5,5,5,0">
   <Grid.RowDefinitions>
      <RowDefinition Height="1*"/>
      <RowDefinition Height="Auto"/>
   </Grid.RowDefinitions>
   <Grid Margin="5,5,5,0">
      <Grid.ColumnDefinitions>
         <ColumnDefinition Width="1*"/>
         <ColumnDefinition Width="1*"/>
      </Grid.ColumnDefinitions>
      <Grid Margin="5,5,5,0">
         <Grid.RowDefinitions>
            <RowDefinition Height="1*"/>
         </Grid.RowDefinitions>
         <TabControl>
            <TabItem Header="{Binding BasicColor_Msg}">
               <Grid HorizontalAlignment="Center"
                        VerticalAlignment="Center">
                  <Grid.RowDefinitions>
                     <RowDefinition Height="Auto"/>
                     <RowDefinition Height="1*"/>
                  </Grid.RowDefinitions>
                  <ListBox ItemsSource="{Binding BasicColors}"
                              SelectedItem="{Binding SelColor}"
                              HorizontalAlignment="Center"
                              BorderThickness="0">
                     <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                           <UniformGrid Columns="13"/>
                        </ItemsPanelTemplate>
                     </ListBox.ItemsPanel>
                     <ListBox.ItemTemplate>
                        <DataTemplate>
                           <Rectangle Width="20"
                                      Height="20"
                                      Margin="2"
                                      Stroke="Black" 
                                      StrokeThickness="0.5"
                                      Fill="{Binding Fill}"/>
                        </DataTemplate>
                     </ListBox.ItemTemplate>
                     <ListBox.ItemContainerStyle>
                        <Style TargetType="ListBoxItem">
                           <Setter Property="Margin" Value="0"/>
                           <Setter Property="Padding" Value="0"/>
                        </Style>
                     </ListBox.ItemContainerStyle>
                  </ListBox>
               </Grid>
            </TabItem>
            <TabItem Header="{Binding ColorPicker_Msg}">
               <TabItem.Resources>
                  <Style TargetType="{x:Type EgtWPFLib5:EgtHexItem}" BasedOn="{StaticResource EgtHexItem}">
                     <Setter Property="BorderThickness" Value="1.5"/>
                     <Setter Property="BorderBrush" Value="White"/>
                  </Style>
               </TabItem.Resources>
               <EgtWPFLib5:EgtHexList ItemsSource="{Binding HexList}"
                                         SelectedItem="{Binding sHexSelColor}"
                                         Orientation="Vertical" 
                                         Margin="2.5"
                                         RowCount="13" 
                                         ColumnCount="13"
                                         Height="300"
                                         Width="350"
                                         Style="{StaticResource EgtHexList}">
                  <EgtWPFLib5:EgtHexList.ItemTemplate>
                     <DataTemplate/>
                  </EgtWPFLib5:EgtHexList.ItemTemplate>
                  <EgtWPFLib5:EgtHexList.ItemContainerStyle>
                     <Style TargetType="EgtWPFLib5:EgtHexItem" BasedOn="{StaticResource EgtHexItem}">
                        <Setter Property="Grid.Row" Value="{Binding nRow}"/>
                        <Setter Property="Grid.Column" Value="{Binding nColumn}"/>
                        <Setter Property="Background" Value="{Binding Background}"/>
                     </Style>
                  </EgtWPFLib5:EgtHexList.ItemContainerStyle>
               </EgtWPFLib5:EgtHexList>
            </TabItem>
            <TabItem Header="{Binding ColorPickerTheme_Msg}">
               <Grid HorizontalAlignment="Center"
                        VerticalAlignment="Center">
                  <Grid.RowDefinitions>
                     <RowDefinition Height="Auto"/>
                     <RowDefinition Height="1*"/>
                  </Grid.RowDefinitions>
                  <ListBox ItemsSource="{Binding BasicColorsTheme}"
                              SelectedItem="{Binding SelColorTheme}"
                              BorderThickness="0">
                     <ListBox.ItemsPanel>
                        <ItemsPanelTemplate>
                           <UniformGrid Columns="13"/>
                        </ItemsPanelTemplate>
                     </ListBox.ItemsPanel>
                     <ListBox.ItemTemplate>
                        <DataTemplate>
                           <Rectangle Width="20"
                                         Height="20"
                                         Margin="2"
                                         Stroke="Black" 
                                         StrokeThickness="0.5"
                                         Fill="{Binding Fill}"/>
                        </DataTemplate>
                     </ListBox.ItemTemplate>
                     <ListBox.ItemContainerStyle>
                        <Style TargetType="ListBoxItem">
                           <Setter Property="Margin" Value="0"/>
                           <Setter Property="Padding" Value="0"/>
                        </Style>
                     </ListBox.ItemContainerStyle>
                  </ListBox>
               </Grid>
            </TabItem>
         </TabControl>
      </Grid>
      <Grid Grid.Column="1"
               Margin="5,0,0,0">
         <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="Auto"/>
         </Grid.RowDefinitions>
         <TextBlock Text="{Binding CustomColor_Msg}"
                       Margin="5,18,5,10"
                       Style="{StaticResource DialogWindow_TextBlock}"/>
         <Grid Grid.Row="1">
            <Grid.RowDefinitions>
               <RowDefinition Height="Auto"/>
               <RowDefinition Height="1*"/>
            </Grid.RowDefinitions>
            <ListBox ItemsSource="{Binding CustomColors}"
                        SelectedItem="{Binding SelCustomColor}"
                        HorizontalAlignment="Center"
                        Background="Transparent"
                        BorderThickness="0">
               <ListBox.ItemsPanel>
                  <ItemsPanelTemplate>
                     <UniformGrid Columns="13"/>
                  </ItemsPanelTemplate>
               </ListBox.ItemsPanel>
               <ListBox.ItemTemplate>
                  <DataTemplate>
                     <Rectangle Width="20"
                                   Height="20"
                                   Margin="2"
                                   Stroke="Black" 
                                   StrokeThickness="0.5"
                                   Fill="{Binding Fill}"/>
                  </DataTemplate>
               </ListBox.ItemTemplate>
               <ListBox.ItemContainerStyle>
                  <Style TargetType="ListBoxItem">
                     <Setter Property="Margin" Value="0"/>
                     <Setter Property="Padding" Value="0"/>
                  </Style>
               </ListBox.ItemContainerStyle>
            </ListBox>
         </Grid>
         <Grid Grid.Row="2"
                  Margin="0,20,0,0">
            <Grid.ColumnDefinitions>
               <ColumnDefinition Width="Auto"/>
               <ColumnDefinition Width="1*"/>
            </Grid.ColumnDefinitions>
            <Grid Margin="0,10,5,0"
                     HorizontalAlignment="Left">
               <Grid.RowDefinitions>
                  <RowDefinition Height="1*" />
                  <RowDefinition Height="Auto" />
               </Grid.RowDefinitions>
               <Rectangle Width="100" 
                             Height="70" 
                             Stroke="Black" 
                             StrokeThickness="0.5"
                             Fill="{Binding CurrColor}"/>
               <Button x:Name="SaveColor"
                          Grid.Row="1"
                          Margin="0,10,0,0"
                          Content="{Binding AddCColor_Msg}"
                          Command="{Binding SaveColor_Command}"  
                          Style="{StaticResource LeftPanel_TextButton}"/>
            </Grid>
            <Grid Grid.Column="1">
               <Grid.ColumnDefinitions>
                  <ColumnDefinition Width="1*"/>
                  <ColumnDefinition Width="1*"/>
               </Grid.ColumnDefinitions>
               <Grid.RowDefinitions>
                  <RowDefinition Height="1*"/>
                  <RowDefinition Height="1*"/>
                  <RowDefinition Height="1*"/>
                  <RowDefinition Height="1*"/>
               </Grid.RowDefinitions>
               <TextBlock Text="{Binding Red_Msg}"
                             Margin="0,10,5,0"
                             HorizontalAlignment="Right"
                             Style="{StaticResource DialogWindow_TextBlock}"/>
               <TextBox Grid.Column="1" 
                           HorizontalAlignment="Right"
                           Margin="0,5,5,0"
                           IsReadOnly="False"
                           Text="{Binding Red, UpdateSourceTrigger=PropertyChanged}"
                           Style="{StaticResource ColorPicker_TextBox}"/>
               <TextBlock Grid.Row="1"
                             Text="{Binding Green_Msg}"
                             Margin="5,5,5,0"
                             HorizontalAlignment="Right"
                             Style="{StaticResource DialogWindow_TextBlock}"/>
               <TextBox Grid.Column="1"
                           Grid.Row="1"
                           HorizontalAlignment="Right"
                           Margin="5,5,5,0"
                           IsReadOnly="False"
                           Text="{Binding Green, UpdateSourceTrigger=PropertyChanged}"
                           Style="{StaticResource ColorPicker_TextBox}"/>
               <TextBlock Grid.Row="2"
                             Text="{Binding Blu_Msg}"
                             Margin="5,5,5,0"
                             HorizontalAlignment="Right"
                             Style="{StaticResource DialogWindow_TextBlock}"/>
               <TextBox Grid.Column="1"
                           Grid.Row="2"
                           HorizontalAlignment="Right"
                           Margin="5,5,5,0"
                           IsReadOnly="False"
                           Text="{Binding Blue, UpdateSourceTrigger=PropertyChanged}"
                           Style="{StaticResource ColorPicker_TextBox}"/>
               <TextBlock Grid.Row="3"
                             Text="{Binding Hexadecimal_Msg}"
                             Margin="5,5,5,0"
                             HorizontalAlignment="Right"
                             Style="{StaticResource DialogWindow_TextBlock}"/>
               <TextBox Grid.Column="1"
                           Grid.Row="3"
                           HorizontalAlignment="Right"
                           Margin="5,5,5,0"
                           Text="{Binding Hexadecimal}"
                           Style="{StaticResource ColorPicker_TextBox}"/>
            </Grid>
         </Grid>
      </Grid>
   </Grid>
   <UniformGrid Grid.Row="2"  
                   Rows="1"
                   Margin="10,10,10,0">
      <Button IsDefault="True"
                 Content="OK"
                 Command="{Binding Ok_Command}"
                 Margin="2.5,0,2.5,0"
                 Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
      <Button Content="Cancel"
                 Command="{Binding Cancel_Command}"
                 Margin="2.5,0,2.5,0"
                 Style="{StaticResource OnlyRightPanel_HalfRound_Button}"/>
   </UniformGrid>
   </Grid>
</EgtWPFLib5:EgtCustomWindow>
