Authorization.xaml 8.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <Page x:Class="teaTime.Authorization"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:teaTime"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450" d:DesignWidth="800"
  9. Title="Authorization">
  10. <Page.Resources>
  11. <Style x:Key="FocusVisual">
  12. <Setter Property="Control.Template">
  13. <Setter.Value>
  14. <ControlTemplate>
  15. <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
  16. </ControlTemplate>
  17. </Setter.Value>
  18. </Setter>
  19. </Style>
  20. <SolidColorBrush x:Key="Button.Static.Background" Color="#E8ECC8"/>
  21. <SolidColorBrush x:Key="Button.Static.Border" Color="#E8ECC8"/>
  22. <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FAEDCD"/>
  23. <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FAEDCD"/>
  24. <SolidColorBrush x:Key="Button.Pressed.Background" Color="#FAEDCD"/>
  25. <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FAEDCD"/>
  26. <SolidColorBrush x:Key="Button.Disabled.Background" Color="#FAEDCD"/>
  27. <SolidColorBrush x:Key="Button.Disabled.Border" Color="#FAEDCD"/>
  28. <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FAEDCD"/>
  29. <Style x:Key="RoundedButtonStyle" TargetType="{x:Type Button}">
  30. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual}"/>
  31. <Setter Property="Background" Value="{StaticResource Button.Static.Background}"/>
  32. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border}"/>
  33. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  34. <Setter Property="BorderThickness" Value="0"/>
  35. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  36. <Setter Property="VerticalContentAlignment" Value="Center"/>
  37. <Setter Property="Padding" Value="1"/>
  38. <Setter Property="Template">
  39. <Setter.Value>
  40. <ControlTemplate TargetType="{x:Type Button}">
  41. <Border x:Name="border" CornerRadius="10" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" Background="{TemplateBinding Background}" SnapsToDevicePixels="true">
  42. <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  43. </Border>
  44. <ControlTemplate.Triggers>
  45. <Trigger Property="IsDefaulted" Value="true">
  46. <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  47. </Trigger>
  48. <Trigger Property="IsMouseOver" Value="true">
  49. <Setter Property="Background" TargetName="border" Value="#FAEDCD"/>
  50. <Setter Property="BorderBrush" TargetName="border" Value="#FAEDCD"/>
  51. <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#A77748"/>
  52. <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#A77748"/>
  53. </Trigger>
  54. <Trigger Property="IsPressed" Value="true">
  55. <Setter Property="Background" TargetName="border" Value="#FAEDCD"/>
  56. <Setter Property="BorderBrush" TargetName="border" Value="#FAEDCD"/>
  57. <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#A77748"/>
  58. <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#A77748"/>
  59. </Trigger>
  60. <Trigger Property="IsEnabled" Value="false">
  61. <Setter Property="Background" TargetName="border" Value="#FAEDCD"/>
  62. <Setter Property="BorderBrush" TargetName="border" Value="#FAEDCD"/>
  63. <Setter Property="TextElement.Foreground" TargetName="contentPresenter" Value="#A77748"/>
  64. <Setter Property="TextBlock.Foreground" TargetName="contentPresenter" Value="#A77748"/>
  65. </Trigger>
  66. </ControlTemplate.Triggers>
  67. </ControlTemplate>
  68. </Setter.Value>
  69. </Setter>
  70. </Style>
  71. </Page.Resources>
  72. <Grid>
  73. <Grid.RowDefinitions>
  74. <RowDefinition Height="109*"/>
  75. <RowDefinition Height="341*"/>
  76. </Grid.RowDefinitions>
  77. <Viewbox Stretch="Uniform" Grid.RowSpan="2">
  78. <Border Width="450" Height="450" Background="#D3DB94" HorizontalAlignment="Center" VerticalAlignment="Center" CornerRadius="70" Margin="250,0,250,0">
  79. <StackPanel Margin="30,50,30,0">
  80. <TextBlock Text="Авторизация" FontFamily="{StaticResource GogoiaDeco}" FontSize="45" HorizontalAlignment="Center" Foreground="#A77748"/>
  81. <TextBlock Text="Логин" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="50 35 0 0" VerticalAlignment="Top" />
  82. <StackPanel>
  83. <Rectangle RadiusX="15" RadiusY="15" StrokeThickness="2" Fill="#FAEDCD" Stroke="#A77748" Width="320" Height="35" />
  84. <TextBox x:Name="aLogin" Width="289" Height="30" Text="" FontFamily="{StaticResource UniNeue-Regular}" VerticalContentAlignment="Center" FontSize="15" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="#FAEDCD" Foreground="#A77748" Margin="25 -36 25 0" />
  85. </StackPanel>
  86. <TextBlock Text="Пароль" FontFamily="{StaticResource GogoiaDeco}" FontWeight="Bold" FontSize="20" Foreground="#A77748" HorizontalAlignment="Left" Margin="50 20 0 0" VerticalAlignment="Top" />
  87. <StackPanel>
  88. <Rectangle RadiusX="15" RadiusY="15" StrokeThickness="2" Fill="#FAEDCD" Stroke="#A77748" Width="320" Height="35"/>
  89. <PasswordBox x:Name="aPass" Password="" Width="289" Height="25" FontFamily="{StaticResource UniNeue-Regular}" FontSize="15" VerticalContentAlignment="Center" HorizontalAlignment="Center" VerticalAlignment="Center" BorderThickness="0" Background="#FAEDCD" Foreground="#A77748" Margin="25 -36 20 0"/>
  90. </StackPanel>
  91. <Button x:Name="bAuth" Width="125" Height="30" Margin="0 75 0 0" Click="bAuth_Click" Content="ВОЙТИ" Foreground="#FAEDCD" Background="#A77748" FontFamily="{StaticResource GogoiaDeco}" FontSize="20" HorizontalContentAlignment="Center" VerticalContentAlignment="Bottom" Style="{DynamicResource RoundedButtonStyle}"/>
  92. <Grid Width="125" Height="35">
  93. <Button x:Name="bReg" Width="125" Height="30" Margin="0 5 0 0" Click="bReg_Click" Style="{DynamicResource RoundedButtonStyle}" Background="#D3DB94" Foreground="#FAEDCD" BorderThickness="0" Content="Регистрация" FontFamily="{StaticResource GogoiaDeco}" FontSize="15"/>
  94. <Line X1="25" Y1="27" X2="100" Y2="27" StrokeDashArray="4 2" StrokeDashCap="Round" Stroke="#FAEDCD" />
  95. </Grid>
  96. </StackPanel>
  97. </Border>
  98. </Viewbox>
  99. </Grid>
  100. </Page>