<UserControl x:Class="PPC.Basic"
             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:PPC"
             mc:Ignorable="d" 
             d:DesignHeight="800"
             d:DesignWidth="800"
             Background="White">
    <UserControl.Resources>
        <Style TargetType="TextBlock" x:Key = "TextForSettings">
            <Setter Property="FontFamily" Value ="Abel [RUS by Daymarius]"/>
            <Setter Property="FontSize" Value="36"/>
            <Setter Property="Foreground" Value = "Black"/>
        </Style>
        <Style TargetType="TextBlock" x:Key = "TextForButton">
            <Setter Property="FontFamily" Value ="Kadwa"/>
            <Setter Property="FontSize" Value="30"/>
            <Setter Property="Foreground" Value = "White"/>
            <Setter Property="FontWeight" Value="Bold"/>
        </Style>
        <Style TargetType="TextBox" x:Key="SettingsFields">
            <Setter Property="Height" Value="60"/>
            <Setter Property="Margin" Value="0 10 0 0"/>
            <Setter Property="FontSize" Value="28"/>
            <Setter Property="Foreground" Value="Gray"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Border BorderThickness = "0 0 0 1" BorderBrush="Black">
                            <ScrollViewer x:Name ="PART_ContentHost"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="ApplyButton"
               TargetType="Button">
            <Setter Property="Background" Value="#2B2E4A"/>
            <Setter Property="Height" Value="100"/>
            <Setter Property="Width" Value="500"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate>
                        <Border Background="{TemplateBinding Background}"
                                CornerRadius="50"
                                Height="{TemplateBinding Height}"
                                Width="{TemplateBinding Width}">
                            <ContentControl HorizontalAlignment="Center"
                                              VerticalAlignment="Center">
                                <TextBlock Text="{Binding Content, RelativeSource={RelativeSource TemplatedParent}}"
                                           Style="{StaticResource TextForButton}"/>
                            </ContentControl>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition/>
        </Grid.ColumnDefinitions>
        <Grid.RowDefinitions>
            <RowDefinition Height="150" />
            <RowDefinition Height="150" />
            <RowDefinition Height="150" />
            <RowDefinition Height="150" />
            <RowDefinition/>
        </Grid.RowDefinitions>
        <StackPanel Grid.Row="0" Grid.Column="0" Margin="10,10,10,10" Grid.RowSpan="2">
            <TextBlock Style="{StaticResource TextForSettings}">Фамилия</TextBlock>
            <TextBox Style="{StaticResource SettingsFields}" Text="{Binding Surname}"/>
        </StackPanel>
        <StackPanel Grid.Row="1" Grid.Column="0" Margin="10,10,10,10" Grid.RowSpan="2">
            <TextBlock Style="{StaticResource TextForSettings}">Имя</TextBlock>
            <TextBox Style="{StaticResource SettingsFields}" Text="{Binding Name}"/>
        </StackPanel>
        <StackPanel Grid.Row="2" Grid.Column="0" Margin="10,10,10,10" Grid.RowSpan="2">
            <TextBlock Style="{StaticResource TextForSettings}">Отчество</TextBlock>
            <TextBox Style="{StaticResource SettingsFields}" Text="{Binding Patronymic}"/>
        </StackPanel>
        <StackPanel Grid.Row="3" Grid.Column="0" Margin="10,10,10,10" Grid.RowSpan="2">
            <TextBlock Style="{StaticResource TextForSettings}">Телефон</TextBlock>
            <TextBox Style="{StaticResource SettingsFields}" Text="{Binding Phone}"/>
        </StackPanel>
        <Button Grid.Column="0"
                Grid.Row="4"
                Margin="0 70 0 0"
                Style="{StaticResource ApplyButton}">ПОДТВЕРДИТЬ ИЗМЕНЕНИЯ</Button>
    </Grid>
</UserControl>
