MainWindow.xaml 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <Window x:Name="window" x:Class="PPC.MainWindow"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  5. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  6. xmlns:local="clr-namespace:PPC"
  7. mc:Ignorable="d"
  8. Title="MainWindow" Height="1024px" Width="1440px">
  9. <Window.Resources>
  10. <Style x:Key="FontForTextBlockOnLoginAndPassword"
  11. TargetType="TextBlock">
  12. <Setter Property="FontFamily" Value="Abel [RUS by Daymarius]"/>
  13. <Setter Property="FontSize" Value="40"/>
  14. <Setter Property="Foreground" Value="White"/>
  15. <Setter Property="FontWeight" Value="Regular"/>
  16. </Style>
  17. <Style x:Key="FontForMainButton"
  18. BasedOn="{StaticResource FontForTextBlockOnLoginAndPassword}"
  19. TargetType="TextBlock">
  20. <Setter Property="FontWeight" Value="Bold"/>
  21. <Setter Property="FontFamily" Value="Kadwa"/>
  22. </Style>
  23. <Style x:Key="FontForInputLogin"
  24. TargetType="TextBox">
  25. <Setter Property="FontFamily" Value="Abel [RUS by Daymarius]"/>
  26. <Setter Property="FontSize" Value="28"/>
  27. <Setter Property="Foreground" Value="Black"/>
  28. <Setter Property="FontWeight" Value="Regular"/>
  29. </Style>
  30. <Style x:Key="StyleForLoginBox"
  31. TargetType="TextBox"
  32. BasedOn="{StaticResource FontForInputLogin}">
  33. <Setter Property="Height" Value="70"/>
  34. <Setter Property="Width" Value="600"/>
  35. <Setter Property="BorderBrush" Value="Black"/>
  36. <Setter Property="BorderThickness" Value="1"/>
  37. <Setter Property="Padding" Value="30,0,30,0"/>
  38. <Setter Property="VerticalContentAlignment" Value = "Center"/>
  39. <Setter Property="Text" Value=""/>
  40. <Setter Property="Template">
  41. <Setter.Value>
  42. <ControlTemplate TargetType="TextBox">
  43. <Border Background="{TemplateBinding Background}"
  44. BorderBrush="{TemplateBinding BorderBrush}"
  45. BorderThickness="{TemplateBinding BorderThickness}"
  46. CornerRadius="30">
  47. <ScrollViewer x:Name ="PART_ContentHost"/>
  48. </Border>
  49. </ControlTemplate>
  50. </Setter.Value>
  51. </Setter>
  52. </Style>
  53. <Style x:Key="StyleForPasswordBox" TargetType="PasswordBox">
  54. <Setter Property="Height" Value="70"/>
  55. <Setter Property="Width" Value="600"/>
  56. <Setter Property="FontSize" Value="28"/>
  57. <Setter Property="Padding" Value="30,0,30,0"/>
  58. <Setter Property="BorderBrush" Value="Black"/>
  59. <Setter Property="VerticalContentAlignment" Value = "Center"/>
  60. <Setter Property="BorderThickness" Value="1"/>
  61. <Setter Property="Template">
  62. <Setter.Value>
  63. <ControlTemplate TargetType="PasswordBox">
  64. <Border Background="{TemplateBinding Background}"
  65. BorderBrush="{TemplateBinding BorderBrush}"
  66. BorderThickness="{TemplateBinding BorderThickness}"
  67. CornerRadius="30">
  68. <ScrollViewer x:Name="PART_ContentHost"/>
  69. </Border>
  70. </ControlTemplate>
  71. </Setter.Value>
  72. </Setter>
  73. </Style>
  74. <Style TargetType="Button" x:Key="StyleForAuthButton">
  75. <Setter Property="Margin" Value="0,100,0,0"/>
  76. <Setter Property="Height" Value="100"/>
  77. <Setter Property="Width" Value="500"/>
  78. <Setter Property="Background" Value="#E84545"/>
  79. <Setter Property="Content" Value="ВОЙТИ"/>
  80. <Setter Property="Template">
  81. <Setter.Value>
  82. <ControlTemplate TargetType="Button">
  83. <Border Background ="{TemplateBinding Background}"
  84. Width ="{TemplateBinding Width}"
  85. Height="{TemplateBinding Height}"
  86. CornerRadius="50">
  87. <ContentControl HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  88. VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
  89. <TextBlock Style="{StaticResource FontForMainButton}" Text="{TemplateBinding Content}"/>
  90. </ContentControl>
  91. </Border>
  92. </ControlTemplate>
  93. </Setter.Value>
  94. </Setter>
  95. </Style>
  96. </Window.Resources>
  97. <Grid>
  98. <Grid.RowDefinitions>
  99. <RowDefinition></RowDefinition>
  100. </Grid.RowDefinitions>
  101. <Grid.ColumnDefinitions>
  102. <ColumnDefinition Width="1*"></ColumnDefinition>
  103. <ColumnDefinition Width="2*"></ColumnDefinition>
  104. <ColumnDefinition Width="1*"></ColumnDefinition>
  105. </Grid.ColumnDefinitions>
  106. <Canvas Grid.Column="0" Grid.Row="0" Background="#2B2E4A"></Canvas>
  107. <Canvas Grid.Column="2" Grid.Row="0" Background="#2B2E4A"></Canvas>
  108. <StackPanel Grid.Column="1" Grid.Row="0">
  109. <Image Source="/Images/MainIcon.jpg" Width="450" Height="435" Margin="0 32 0 13"></Image>
  110. <StackPanel Width="600px">
  111. <TextBlock Text="Логин" Foreground="Black" Style="{StaticResource FontForTextBlockOnLoginAndPassword}"/>
  112. <TextBox x:Name="Login" Text="{Binding Login, UpdateSourceTrigger=PropertyChanged}" Style="{StaticResource StyleForLoginBox}"></TextBox>
  113. <TextBlock Text="Пароль" Foreground="Black" Margin="0,30,0,0" Style="{StaticResource FontForTextBlockOnLoginAndPassword}"/>
  114. <PasswordBox x:Name="Password" Style="{StaticResource StyleForPasswordBox}"></PasswordBox>
  115. </StackPanel>
  116. <Button Command="{Binding Auth}" CommandParameter="{Binding ElementName=window, Mode=OneWay}" Style="{StaticResource StyleForAuthButton}"/>
  117. <TextBlock Margin="15" FontSize="20" TextAlignment="Center"><Hyperlink NavigateUri="" RequestNavigate="Hyperlink_RequestNavigate">У вас нет аккаунта?</Hyperlink></TextBlock>
  118. </StackPanel>
  119. </Grid>
  120. </Window>