<Window x:Class="NBAManagment.PlayersMain"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:NBAManagment"
        mc:Ignorable="d"
        Loaded="Window_Loaded_Players"
        Title="PlayersMain" Height="600" Width="1200" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">

    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="80"/>
            <RowDefinition Height="77"/>
            <RowDefinition Height="*"/>
            <RowDefinition Height="70"/>
        </Grid.RowDefinitions>

        <!-- Заголовок окна -->
        <StackPanel Grid.Row="0" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="10">
            <TextBlock Text="NBA Players" VerticalAlignment="Center" FontSize="30" Margin="10" FontFamily="Segoe UI" FontWeight="Bold" Foreground="DarkSlateGray"/>
        </StackPanel>


        <Button Content="Back" HorizontalAlignment="Right" VerticalAlignment="Top"  Height="32" Width="95" Style="{StaticResource ModernButton}" Click="Button_Click" Margin="0,21,10,0"/>
        <Image HorizontalAlignment="Left" Height="70" Margin="10,5,0,0" VerticalAlignment="Top" Width="50" Source="/logo.jpg"/>
        <TextBlock Text="NBA Management System" Foreground="Gray" FontFamily="Segoe UI" Margin="50 0 0 0" VerticalAlignment="Center" HorizontalAlignment="Left" FontSize="20"/>


        <DataGrid Grid.Row="2" 
                  AutoGenerateColumns="False"
                  x:Name="PlayersGrid">

            <DataGrid.Columns>
                <DataGridTextColumn Header="ID" Width="*" Binding="{Binding IdPlayer, StringFormat={}№{0}}"/>
                <DataGridTextColumn Header="Image" Width="*" Binding="{Binding Image}"/>
                <DataGridTextColumn Header="Name" Width="*" Binding="{Binding Name}"/>
                <DataGridTextColumn Header="Position" Width="*" Binding="{Binding Position.NamePosition}"/>
                <DataGridTextColumn Header="Join Year" Width="*" Binding="{Binding JoinYear, StringFormat='{}{0:dd.MM.yyyy}'}"/>
                <DataGridTextColumn Header="Gender" Width="*" Binding="{Binding Gender.NameGender}"/>
                <DataGridTextColumn Header="Height" Width="*" Binding="{Binding Height}"/>
                <DataGridTextColumn Header="Weight" Width="*" Binding="{Binding Weight}"/>
                <DataGridTextColumn Header="Data Of Birth" Width="*" Binding="{Binding DateOfBirth, StringFormat='{}{0:dd.MM.yyyy}'}"/>
                <DataGridTextColumn Header="College" Width="*" Binding="{Binding College}"/>
                <DataGridTextColumn Header="Email" Width="*" Binding="{Binding Email}"/>
                <DataGridTextColumn Header="Country" Width="*" Binding="{Binding Country.NameCountry}"/>
                <DataGridTextColumn Header="Is Retriment" Width="*" Binding="{Binding IsRetriment}"/>
                <DataGridTextColumn Header="Retriment Time" Width="*" Binding="{Binding RetrimentTime}"/>
               

            </DataGrid.Columns>
                
            
        </DataGrid>
        
        <!--</StackPanel> ОТБОРЫ-->
        <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="237,0,234,0">
            <TextBlock Text="Position" Height="17" Width="50" />

            <ComboBox   Name="ComboSortCountry"  Margin="3, 6, 50, 6" Width="231" IsSynchronizedWithCurrentItem="True" Height="28" SelectionChanged="ComboSortCountry_SelectionChanged">
                <ComboBoxItem Content="ALL"></ComboBoxItem>
                <ComboBoxItem Content="SmallForward"></ComboBoxItem>
                <ComboBoxItem Content="PowerForward"></ComboBoxItem>
                <ComboBoxItem Content="Center"></ComboBoxItem>
                <ComboBoxItem Content="ShootingGuard"></ComboBoxItem>
                <ComboBoxItem Content="PointGuard"></ComboBoxItem>
               
            </ComboBox>

            <TextBlock Text="Player name" Height="19" Width="76" />
            <TextBox x:Name="playqerNameTextBox" Foreground="{StaticResource DarkGray}" Padding="5" TextChanged="TBoxSearch_TextChanged"  Text="{Binding FilterName, Mode=TwoWay, UpdateSourceTrigger=PropertyChanged}" Margin="3, 6, 50, 6" Width="232" Height="28"/>
        </StackPanel>   
        
        
       
        
     
        
    </Grid>
</Window>
