<Page x:Class="Penis.Tabl"
      xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
      xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
      xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
      xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
      xmlns:local="clr-namespace:Penis"
      mc:Ignorable="d" 
      d:DesignHeight="450" d:DesignWidth="800"
      Title="Tabl">

    <Grid Background="Lavender">
        <Grid.RowDefinitions>
            <RowDefinition Height="87*"/>
            <RowDefinition Height="87*"/>
            <RowDefinition Height="94*"/>
            <RowDefinition Height="92*" MinHeight="30"/>
            <RowDefinition Height="90*" MinHeight="30"/>
        </Grid.RowDefinitions>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
            <ColumnDefinition/>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0">
            <TextBlock Margin="9,9,0,0" 
           TextWrapping="Wrap" 
            HorizontalAlignment="Left" VerticalAlignment="Center"
            RenderTransformOrigin="0.602,0.975"> 
    <Button FontSize="19" Foreground="Gray" FontWeight="Bold" Click="Nazad1">Назад</Button>
            </TextBlock>
        </StackPanel>
        <StackPanel Grid.Row="1" Grid.Column="0" Grid.ColumnSpan="3" Grid.RowSpan="3">
            <DataGrid Name="Reks" AutoGenerateColumns="False" CanUserAddRows="False">
                <DataGrid.Columns>
                    <DataGridTextColumn Header="Фамилия" Width="*" Binding="{Binding Path=Surname}" ></DataGridTextColumn>
                    <DataGridTextColumn Header="Имя" Width="*" Binding="{Binding Path=Name}" ></DataGridTextColumn>
                    <DataGridTextColumn Header="Отчество" Width="*" Binding="{Binding Path=Patronymic}" ></DataGridTextColumn>
                    <DataGridTextColumn Header="Логин" Width="*" Binding="{Binding Path=Login}" ></DataGridTextColumn>
                    <DataGridTextColumn Header="Пол" Width="*" Binding="{Binding Path=Gender.Gender1}" ></DataGridTextColumn>
                    <DataGridTextColumn Header="Дата рождения" Width="*" Binding="{Binding Path=BirthDate}" ></DataGridTextColumn>
                </DataGrid.Columns>
            </DataGrid>
        </StackPanel>
        <StackPanel Grid.Row="5" Grid.Column="2">
            <TextBlock Margin="0,0,0,0" 
           TextWrapping="Wrap" 
            HorizontalAlignment="Center" VerticalAlignment="Center"
            RenderTransformOrigin="0.602,0.975"> 
    <Run FontSize="18" Foreground="Gray" FontWeight="Bold">Сортировка по полу</Run>
            </TextBlock>
            <TextBlock Margin="0,0,0,0" 
           TextWrapping="Wrap" 
            HorizontalAlignment="Center" VerticalAlignment="Center"
            RenderTransformOrigin="0.602,0.975"> 
    <Button FontSize="17" Foreground="Gray" FontWeight="Bold" Click="Men">Мужчины</Button>
            </TextBlock>
            <TextBlock Margin="0,0,0,0" 
           TextWrapping="Wrap" 
            HorizontalAlignment="Center" VerticalAlignment="Center"
            RenderTransformOrigin="0.602,0.975"> 
    <Button FontSize="17" Foreground="Gray" FontWeight="Bold" Click="Gerl" >Женщины</Button>
            </TextBlock>
        </StackPanel>
        <StackPanel Grid.Row="5" Grid.Column="0">
            <TextBlock Margin="0,0,0,0" 
           TextWrapping="Wrap" 
            HorizontalAlignment="Center" VerticalAlignment="Center"
            RenderTransformOrigin="0.602,0.975"> 
    <Run FontSize="18" Foreground="Gray" FontWeight="Bold">Сортировка по алфавиту</Run>
            </TextBlock>
            <TextBlock Margin="0,0,0,0" 
           TextWrapping="Wrap" 
            HorizontalAlignment="Center" VerticalAlignment="Center"
            RenderTransformOrigin="0.602,0.975"> 
    <Button FontSize="17" Foreground="Gray" FontWeight="Bold" Click="AZ">От А до Я</Button>
            </TextBlock>
            <TextBlock Margin="0,0,0,0" 
           TextWrapping="Wrap" 
            HorizontalAlignment="Center" VerticalAlignment="Center"
            RenderTransformOrigin="0.602,0.975"> 
    <Button FontSize="17" Foreground="Gray" FontWeight="Bold" Click="ZA" >От Я до А</Button>
            </TextBlock>
        </StackPanel>
        <StackPanel Grid.Row="5" Grid.Column="1">
            <TextBlock Margin="0,0,0,0" 
           TextWrapping="Wrap" 
            HorizontalAlignment="Center" VerticalAlignment="Center"
            RenderTransformOrigin="0.602,0.975"> 
    <Run FontSize="18" Foreground="Gray" FontWeight="Bold">Поиск по фамилии и имени</Run>
            </TextBlock>

            <TextBox Name="Poiskk">

            </TextBox>
            <TextBlock Margin="0,0,0,0" 
           TextWrapping="Wrap" 
            HorizontalAlignment="Center" VerticalAlignment="Center"
            RenderTransformOrigin="0.602,0.975"> 
    <Button FontSize="17" Foreground="Gray" FontWeight="Bold" Click=" Poisk">Поиск</Button>
            </TextBlock>
        </StackPanel>
    </Grid>
</Page>
