Authorization.xaml 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191
  1. <Page x:Class="MusicSmth.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:MusicSmth"
  7. mc:Ignorable="d"
  8. d:DesignHeight="800" d:DesignWidth="1360"
  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" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
  16. </ControlTemplate>
  17. </Setter.Value>
  18. </Setter>
  19. </Style>
  20. <SolidColorBrush x:Key="Button.Static.Background" Color="#FFDDDDDD"/>
  21. <SolidColorBrush x:Key="Button.Static.Border" Color="#FF707070"/>
  22. <SolidColorBrush x:Key="Button.MouseOver.Background" Color="#FFBEE6FD"/>
  23. <SolidColorBrush x:Key="Button.MouseOver.Border" Color="#FF3C7FB1"/>
  24. <SolidColorBrush x:Key="Button.Pressed.Background" Color="#FFC4E5F6"/>
  25. <SolidColorBrush x:Key="Button.Pressed.Border" Color="#FF2C628B"/>
  26. <SolidColorBrush x:Key="Button.Disabled.Background" Color="#FFF4F4F4"/>
  27. <SolidColorBrush x:Key="Button.Disabled.Border" Color="#FFADB2B5"/>
  28. <SolidColorBrush x:Key="Button.Disabled.Foreground" Color="#FF838383"/>
  29. <Style x:Key="ButtonStyle1" 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="1"/>
  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" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" 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. </ControlTemplate.Triggers>
  49. </ControlTemplate>
  50. </Setter.Value>
  51. </Setter>
  52. </Style>
  53. <Style x:Key="FocusVisual1">
  54. <Setter Property="Control.Template">
  55. <Setter.Value>
  56. <ControlTemplate>
  57. <Rectangle Margin="2" StrokeDashArray="1 2" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" SnapsToDevicePixels="true" StrokeThickness="1"/>
  58. </ControlTemplate>
  59. </Setter.Value>
  60. </Setter>
  61. </Style>
  62. <SolidColorBrush x:Key="Button.Static.Background1" Color="#FFDDDDDD"/>
  63. <SolidColorBrush x:Key="Button.Static.Border1" Color="#FF707070"/>
  64. <SolidColorBrush x:Key="Button.MouseOver.Background1" Color="#FFBEE6FD"/>
  65. <SolidColorBrush x:Key="Button.MouseOver.Border1" Color="#FF3C7FB1"/>
  66. <SolidColorBrush x:Key="Button.Pressed.Background1" Color="#FFC4E5F6"/>
  67. <SolidColorBrush x:Key="Button.Pressed.Border1" Color="#FF2C628B"/>
  68. <SolidColorBrush x:Key="Button.Disabled.Background1" Color="#FFF4F4F4"/>
  69. <SolidColorBrush x:Key="Button.Disabled.Border1" Color="#FFADB2B5"/>
  70. <SolidColorBrush x:Key="Button.Disabled.Foreground1" Color="#FF838383"/>
  71. <Style x:Key="ButtonStyle2" TargetType="{x:Type Button}">
  72. <Setter Property="FocusVisualStyle" Value="{StaticResource FocusVisual1}"/>
  73. <Setter Property="Background" Value="{StaticResource Button.Static.Background1}"/>
  74. <Setter Property="BorderBrush" Value="{StaticResource Button.Static.Border1}"/>
  75. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  76. <Setter Property="BorderThickness" Value="1"/>
  77. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  78. <Setter Property="VerticalContentAlignment" Value="Center"/>
  79. <Setter Property="Padding" Value="1"/>
  80. <Setter Property="Template">
  81. <Setter.Value>
  82. <ControlTemplate TargetType="{x:Type Button}">
  83. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="true">
  84. <ContentPresenter x:Name="contentPresenter" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="True" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  85. </Border>
  86. <ControlTemplate.Triggers>
  87. <Trigger Property="IsDefaulted" Value="true">
  88. <Setter Property="BorderBrush" TargetName="border" Value="{DynamicResource {x:Static SystemColors.HighlightBrushKey}}"/>
  89. </Trigger>
  90. </ControlTemplate.Triggers>
  91. </ControlTemplate>
  92. </Setter.Value>
  93. </Setter>
  94. </Style>
  95. <SolidColorBrush x:Key="TextBox.Static.Border" Color="#FFABAdB3"/>
  96. <SolidColorBrush x:Key="TextBox.MouseOver.Border" Color="#FF7EB4EA"/>
  97. <SolidColorBrush x:Key="TextBox.Focus.Border" Color="#FF569DE5"/>
  98. <Style x:Key="PasswordBoxStyle1" TargetType="{x:Type PasswordBox}">
  99. <Setter Property="PasswordChar" Value="●"/>
  100. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
  101. <Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border}"/>
  102. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  103. <Setter Property="BorderThickness" Value="1"/>
  104. <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
  105. <Setter Property="HorizontalContentAlignment" Value="Left"/>
  106. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  107. <Setter Property="AllowDrop" Value="true"/>
  108. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  109. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  110. <Setter Property="Template">
  111. <Setter.Value>
  112. <ControlTemplate TargetType="{x:Type PasswordBox}">
  113. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
  114. <ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
  115. </Border>
  116. </ControlTemplate>
  117. </Setter.Value>
  118. </Setter>
  119. <Style.Triggers>
  120. <MultiTrigger>
  121. <MultiTrigger.Conditions>
  122. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true"/>
  123. <Condition Property="IsSelectionActive" Value="false"/>
  124. </MultiTrigger.Conditions>
  125. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
  126. </MultiTrigger>
  127. </Style.Triggers>
  128. </Style>
  129. <SolidColorBrush x:Key="TextBox.Static.Border1" Color="#FFABAdB3"/>
  130. <SolidColorBrush x:Key="TextBox.MouseOver.Border1" Color="#FF7EB4EA"/>
  131. <SolidColorBrush x:Key="TextBox.Focus.Border1" Color="#FF569DE5"/>
  132. <Style x:Key="TextBoxStyle1" TargetType="{x:Type TextBox}">
  133. <Setter Property="Background" Value="{DynamicResource {x:Static SystemColors.WindowBrushKey}}"/>
  134. <Setter Property="BorderBrush" Value="{StaticResource TextBox.Static.Border1}"/>
  135. <Setter Property="Foreground" Value="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}"/>
  136. <Setter Property="BorderThickness" Value="1"/>
  137. <Setter Property="KeyboardNavigation.TabNavigation" Value="None"/>
  138. <Setter Property="HorizontalContentAlignment" Value="Left"/>
  139. <Setter Property="FocusVisualStyle" Value="{x:Null}"/>
  140. <Setter Property="AllowDrop" Value="true"/>
  141. <Setter Property="ScrollViewer.PanningMode" Value="VerticalFirst"/>
  142. <Setter Property="Stylus.IsFlicksEnabled" Value="False"/>
  143. <Setter Property="Template">
  144. <Setter.Value>
  145. <ControlTemplate TargetType="{x:Type TextBox}">
  146. <Border x:Name="border" Background="{TemplateBinding Background}" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}" SnapsToDevicePixels="True">
  147. <ScrollViewer x:Name="PART_ContentHost" Focusable="false" HorizontalScrollBarVisibility="Hidden" VerticalScrollBarVisibility="Hidden"/>
  148. </Border>
  149. </ControlTemplate>
  150. </Setter.Value>
  151. </Setter>
  152. <Style.Triggers>
  153. <MultiTrigger>
  154. <MultiTrigger.Conditions>
  155. <Condition Property="IsInactiveSelectionHighlightEnabled" Value="true"/>
  156. <Condition Property="IsSelectionActive" Value="false"/>
  157. </MultiTrigger.Conditions>
  158. <Setter Property="SelectionBrush" Value="{DynamicResource {x:Static SystemColors.InactiveSelectionHighlightBrushKey}}"/>
  159. </MultiTrigger>
  160. </Style.Triggers>
  161. </Style>
  162. </Page.Resources>
  163. <Grid Background="#1DB954">
  164. <Image Source="Doggie.jpg" Stretch="Fill" Opacity="0.1"></Image>
  165. <StackPanel HorizontalAlignment="Center" Margin="0,50,0,0" Orientation="Vertical">
  166. <TextBlock FontSize="36">ВХОД</TextBlock>
  167. </StackPanel>
  168. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center" Width="150">
  169. <TextBlock FontSize="20" HorizontalAlignment="Center">Логин</TextBlock>
  170. <Border BorderThickness="1" CornerRadius="10" BorderBrush="Black">
  171. <TextBox Style="{DynamicResource TextBoxStyle1}" VerticalContentAlignment="Center" VerticalAlignment="Center" Margin="1" Name="Login" Background="#0000" BorderBrush="#0000" Height="25"></TextBox>
  172. </Border>
  173. <TextBlock FontSize="20" HorizontalAlignment="Center">Пароль</TextBlock>
  174. <Border BorderThickness="1" CornerRadius="10" BorderBrush="Black">
  175. <PasswordBox Style="{DynamicResource PasswordBoxStyle1}" VerticalContentAlignment="Center" VerticalAlignment="Center" Margin="1" Name="Pass" Background="#0000" BorderBrush="#0000" Height="25"/>
  176. </Border>
  177. </StackPanel>
  178. <StackPanel HorizontalAlignment="Center" VerticalAlignment="Bottom" Margin="0,0,0,95">
  179. <Border Background="Black" CornerRadius="10" Width="150" Height="30">
  180. <Button Style="{DynamicResource ButtonStyle1}" Height="23" Name="Enter" Foreground="White" Background="#0000" BorderBrush="#0000" Click="Enter_Click">ВОЙТИ</Button>
  181. </Border>
  182. </StackPanel>
  183. <StackPanel VerticalAlignment="Bottom" Margin="0,0,0,70" HorizontalAlignment="Center">
  184. <Button Style="{DynamicResource ButtonStyle2}" Name="GoReg" Click="GoReg_Click" BorderBrush="#0000" Background="#0000" FontWeight="DemiBold" FontSize="14">Нет аккаунта? Зарегистрируйтесь</Button>
  185. </StackPanel>
  186. </Grid>
  187. </Page>