<Window x:Class="InteractiveKiosk.AuthorizationWindow"
        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:InteractiveKiosk"
        mc:Ignorable="d"
        Height="300" Width="400" AllowsTransparency="True" WindowStartupLocation="CenterScreen" ResizeMode="NoResize" Icon="Logo.png" WindowStyle="None" Background="Transparent">
    <Window.Resources>
        <Style x:Key="TextBox" TargetType="TextBox">
            <Setter Property="Background" Value="White"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Height" Value="23"/>
            <Setter Property="Foreground" Value="Black"/>
            <Setter Property="FontSize" Value="13"/>
            <Setter Property="Padding" Value="10,0,0,0"/>
            <Setter Property="BorderBrush" Value="Black"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="TextBox">
                        <Grid x:Name="root" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" SnapsToDevicePixels="True">
                            <Border x:Name="Background" BorderThickness="1" CornerRadius="15" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"/>
                            <ScrollViewer x:Name="PART_ContentHost" BorderThickness="0" Padding="{TemplateBinding Padding}" IsTabStop="False" Background="{x:Null}" TextElement.Foreground="{TemplateBinding Foreground}"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True">
                                <Setter Property="BorderBrush" Value="Black"/>
                                <Setter Property="Background" Value="White"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
        <Style x:Key="Password" TargetType="PasswordBox">
            <Setter Property="Background" Value="White"/>
            <Setter Property="VerticalContentAlignment" Value="Center"/>
            <Setter Property="Height" Value="23"/>
            <Setter Property="Foreground" Value="Black"/>
            <Setter Property="FontSize" Value="13"/>
            <Setter Property="BorderBrush" Value="Black"/>
            <Setter Property="Padding" Value="10,0,0,0"/>
            <EventSetter Event="PasswordChanged" Handler="OnPasswordChanged"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="PasswordBox">
                        <Grid x:Name="root" Height="{TemplateBinding Height}" Width="{TemplateBinding Width}" SnapsToDevicePixels="True">
                            <Border x:Name="Background" BorderThickness="1" CornerRadius="15" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}"/>
                            <ScrollViewer x:Name="PART_ContentHost" BorderThickness="0" Padding="{TemplateBinding Padding}" IsTabStop="False" Background="{x:Null}" TextElement.Foreground="{TemplateBinding Foreground}"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <Trigger Property="IsFocused" Value="True">
                                <Setter Property="BorderBrush" Value="Black"/>
                                <Setter Property="Background" Value="White"/>
                            </Trigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </Window.Resources>
    <Grid Name="Authorization" Background="Transparent" MouseDown="Authorization_MouseDown">
        <Border CornerRadius="20" BorderBrush="Black" BorderThickness="0">
            <Border.Background>
                <ImageBrush ImageSource="file.jpg"/>
            </Border.Background>
            <TextBlock HorizontalAlignment="Left" TextWrapping="Wrap" Text="АВТОРИЗАЦИЯ" VerticalAlignment="Top" Height="29" Width="150" Margin="130,28,0,0" FontSize="20" FontFamily="Segoe UI Semilight"/>
        </Border>
        <StackPanel Orientation="Horizontal" HorizontalAlignment="Right" Width="69">
            <Image Name="MinButton" Height="23" Width="20" Margin="5,-255,-13,0" MouseDown="MinButton_MouseDown">
                <Image.Style>
                    <Style TargetType="{x:Type Image}">
                        <Setter Property="Source" Value="Resources/min(inactive).png"/>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsMouseOver, ElementName=MinButton}"
                                         Value="True">
                                <Setter Property="Source" Value="Resources/min.png"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Image.Style>
            </Image>
            <Image Name="ExitButton" Height="23" Width="20" Margin="20,-255,20,0" MouseDown="ExitButton_MouseDown">
                <Image.Style>
                    <Style TargetType="{x:Type Image}">
                        <Setter Property="Source" Value="Resources/exit(inactive).png"/>
                        <Style.Triggers>
                            <DataTrigger Binding="{Binding IsMouseOver, ElementName=ExitButton}"
                                         Value="True">
                                <Setter Property="Source" Value="Resources/exit.png"/>
                            </DataTrigger>
                        </Style.Triggers>
                    </Style>
                </Image.Style>
            </Image>
        </StackPanel>
        <Border Name="LogButton" Width="106" BorderThickness="1" Background="Black" CornerRadius="15" Margin="250,201,44,66">
            <Border.Style>
                <Style TargetType="{x:Type Border}">
                    <Setter Property="BorderBrush" Value="Black"/>
                    <Style.Triggers>

                        <EventTrigger RoutedEvent="PreviewMouseDown">
                            <BeginStoryboard>
                                <Storyboard>
                                    <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" Duration="0:0:0.100" To="Gray"/>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                        <EventTrigger RoutedEvent="PreviewMouseUp">
                            <BeginStoryboard>
                                <Storyboard>
                                    <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" Duration="0:0:0.100" To="Black"/>
                                </Storyboard>
                            </BeginStoryboard>
                        </EventTrigger>
                    </Style.Triggers>
                </Style>
            </Border.Style>
            <Button Content="Войти" FontSize="14" Foreground="Black" FontFamily="Segoe UI Semilight" Click="LoginButton">
                <Button.Style>
                    <Style TargetType="Button">
                        <Setter Property="OverridesDefaultStyle" Value="True"/>
                        <Setter Property="Background" Value="White"/>
                        <Setter Property="Template">
                            <Setter.Value>
                                <ControlTemplate TargetType="Button">
                                    <Border Name="Border" BorderThickness="0" BorderBrush="Black" CornerRadius="15" Background="{TemplateBinding Background}">
                                        <ContentPresenter HorizontalAlignment="Center" VerticalAlignment="Center"/>
                                    </Border>
                                    <ControlTemplate.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter Property="Background" Value="Gray"/>
                                        </Trigger>
                                        <EventTrigger RoutedEvent="PreviewMouseDown">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ThicknessAnimation Storyboard.TargetProperty="Margin" Duration="0:0:0.100" To="2, 2, 0, 0"/>
                                                    <ColorAnimation Storyboard.TargetProperty="Background.Color" To="Gray" Duration="0:0:0.0002"/>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                        <EventTrigger RoutedEvent="PreviewMouseUp">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ThicknessAnimation Storyboard.TargetProperty="Margin" Duration="0:0:0.100" To="0, 0, 0, 0"/>
                                                    <ColorAnimation Storyboard.TargetProperty="Background.Color" To="White" Duration="0:0:0.0002"/>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </ControlTemplate.Triggers>
                                </ControlTemplate>
                            </Setter.Value>
                        </Setter>
                    </Style>
                </Button.Style>
            </Button>
        </Border>
        <TextBox x:Name="Login" Style="{StaticResource TextBox}" Margin="173,98,23,169" Height="Auto"/>
        <TextBlock IsHitTestVisible="False" FontSize="14" Text="Логин" VerticalAlignment="Top" Foreground="Gray" Margin="186,105,35,0" FontFamily="Segoe UI Semilight">
            <TextBlock.Style>
                <Style TargetType="{x:Type TextBlock}">
                    <Setter Property="Visibility" Value="Collapsed"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding Text, ElementName=Login}" Value="">
                            <Setter Property="Visibility" Value="Visible"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </TextBlock.Style>
        </TextBlock>
        <PasswordBox x:Name="Password" Style="{StaticResource Password}" Margin="173,136,23,131" Height="Auto"/>
        <TextBlock Name="Watermark" IsHitTestVisible="False" FontSize="14" Text="Пароль" VerticalAlignment="Top" Foreground="Gray" Margin="186,144,35,0" FontFamily="Segoe UI Semilight">
        </TextBlock>
        <TextBlock HorizontalAlignment="Left" Margin="23,105,0,0" TextWrapping="Wrap" Text="Имя пользователя:" VerticalAlignment="Top" Height="23" Width="145" FontSize="14" FontFamily="Segoe UI Semilight"/>
        <TextBlock HorizontalAlignment="Left" Margin="23,144,0,0" TextWrapping="Wrap" Text="Пароль:" VerticalAlignment="Top" Height="23" Width="127" FontSize="14" FontFamily="Segoe UI Semilight"/>
        <ToggleButton Name="Check" Content="Показать пароль" Height="33" Width="164" HorizontalAlignment="Left" VerticalAlignment="Top" Margin="44,203,0,0" Foreground="Black" Checked="PasswordChecked" FontSize="14" FontFamily="Segoe UI Semilight">
            <ToggleButton.Template>
                <ControlTemplate TargetType="{x:Type ToggleButton}">
                    <StackPanel Orientation="Horizontal">
                        <Border Height="28" Width="30" CornerRadius="15" HorizontalAlignment="Left" BorderThickness="1" Background="Transparent">
                            <Border.Style>
                                <Style TargetType="{x:Type Border}">
                                    <Setter Property="BorderBrush" Value="Black"/>
                                    <Style.Triggers>
                                        <Trigger Property="IsMouseOver" Value="True">
                                            <Setter Property="BorderBrush" Value="Gray"/>
                                        </Trigger>
                                        <EventTrigger RoutedEvent="PreviewMouseDown">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" To="Black" Duration="0:0:0.100"/>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                        <EventTrigger RoutedEvent="PreviewMouseUp">
                                            <BeginStoryboard>
                                                <Storyboard>
                                                    <ColorAnimation Storyboard.TargetProperty="BorderBrush.Color" To="White" Duration="0:0:0.100"/>
                                                </Storyboard>
                                            </BeginStoryboard>
                                        </EventTrigger>
                                    </Style.Triggers>
                                </Style>
                            </Border.Style>
                            <Image Margin="2">
                                <Image.Style>
                                    <Style>
                                        <Style.Triggers>
                                            <DataTrigger Binding="{Binding IsChecked, RelativeSource={RelativeSource AncestorType={x:Type ToggleButton}}}" Value="True">
                                                <Setter Property="Image.Source" Value="Resources/checked.png"/>
                                            </DataTrigger>
                                        </Style.Triggers>
                                    </Style>
                                </Image.Style>
                            </Image>
                        </Border>
                        <ContentPresenter Content="{TemplateBinding Content}" Margin="10,0,0,0" VerticalAlignment="Center" HorizontalAlignment="Left"/>
                    </StackPanel>
                </ControlTemplate>
            </ToggleButton.Template>
        </ToggleButton>
        <Image x:Name="man" Margin="60,24,300,236">
            <Image.Source>
                <FormatConvertedBitmap Source="C:\Users\locadm\Source\Repos\InteractiveKiosk9\InteractiveKiosk\Resources\people.png"/>
            </Image.Source>
        </Image>
    </Grid>
</Window>