PlayerProfileSettingsWindow.xaml 6.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114
  1. <Window x:Class="Курсовой_проект_3._1.Windows.PlayerProfileSettingsWindow"
  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:uc="clr-namespace:Курсовой_проект_3._1.UserControls"
  7. xmlns:local="clr-namespace:Курсовой_проект_3._1.Windows"
  8. mc:Ignorable="d"
  9. Title="PlayerProfileSettingsWindow" Height="450" Width="800" ResizeMode="NoResize" WindowStartupLocation="CenterScreen">
  10. <Window.Resources>
  11. <!-- Button style -->
  12. <Style TargetType="Button">
  13. <Setter Property="Template">
  14. <Setter.Value>
  15. <ControlTemplate TargetType="Button">
  16. <Border CornerRadius="5"
  17. Background="{TemplateBinding Background}" x:Name="ButtonBorder">
  18. <ContentPresenter HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
  19. VerticalAlignment="{TemplateBinding VerticalContentAlignment}"/>
  20. </Border>
  21. <ControlTemplate.Triggers>
  22. <Trigger Property="IsPressed" Value="True">
  23. <Setter Property="Background" TargetName="ButtonBorder">
  24. <Setter.Value>
  25. <RadialGradientBrush GradientOrigin="0.496,1.052">
  26. <RadialGradientBrush.RelativeTransform>
  27. <TransformGroup>
  28. <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.5" ScaleY="1.5"/>
  29. <TranslateTransform X="0.02" Y="0.3"/>
  30. </TransformGroup>
  31. </RadialGradientBrush.RelativeTransform>
  32. <GradientStop Color="#00000000" Offset="1"/>
  33. <GradientStop Color="#FF303030" Offset="0.3"/>
  34. </RadialGradientBrush>
  35. </Setter.Value>
  36. </Setter>
  37. </Trigger>
  38. <Trigger Property="IsMouseOver" Value="True">
  39. <Setter Property="Background" Value="WhiteSmoke" TargetName="ButtonBorder">
  40. </Setter>
  41. </Trigger>
  42. <Trigger Property="IsEnabled" Value="False">
  43. <Setter Property="Background" TargetName="ButtonBorder">
  44. <Setter.Value>
  45. <RadialGradientBrush GradientOrigin="0.496,1.052">
  46. <RadialGradientBrush.RelativeTransform>
  47. <TransformGroup>
  48. <ScaleTransform CenterX="0.5" CenterY="0.5" ScaleX="1.5" ScaleY="1.5"/>
  49. <TranslateTransform X="0.02" Y="0.3"/>
  50. </TransformGroup>
  51. </RadialGradientBrush.RelativeTransform>
  52. <GradientStop Color="#00000000" Offset="1"/>
  53. <GradientStop Color="#FF303030" Offset="0.3"/>
  54. </RadialGradientBrush>
  55. </Setter.Value>
  56. </Setter>
  57. </Trigger>
  58. </ControlTemplate.Triggers>
  59. </ControlTemplate>
  60. </Setter.Value>
  61. </Setter>
  62. </Style>
  63. </Window.Resources>
  64. <Grid>
  65. <Grid.ColumnDefinitions>
  66. <ColumnDefinition/>
  67. <ColumnDefinition Width="2*"/>
  68. </Grid.ColumnDefinitions>
  69. <Grid.RowDefinitions>
  70. <RowDefinition Height="3*"/>
  71. <RowDefinition/>
  72. </Grid.RowDefinitions>
  73. <!-- Photo -->
  74. <Border Grid.Column="0" Grid.Row="0" BorderBrush="#FF68A4C8" BorderThickness="2" Margin="10">
  75. <Image x:Name="UserPhoto" Source="C:\Users\nikich4523\source\repos\Курсовой проект 3.1\Images\WithoutPhoto.png" Margin="5"/>
  76. </Border>
  77. <Button x:Name="ChangePhotoBtn" Grid.Column="0" Grid.Row="1" Margin="20 30 20 30" Content="Выбрать изображение" FontSize="16" FontWeight="SemiBold" Click="ChangePhotoBtn_Click"/>
  78. <!-- Country, phone, email, about me -->
  79. <Grid Grid.Column="1" Grid.Row="0">
  80. <Grid.RowDefinitions>
  81. <RowDefinition/>
  82. <RowDefinition/>
  83. <RowDefinition/>
  84. <RowDefinition Height="2*"/>
  85. </Grid.RowDefinitions>
  86. <StackPanel Grid.Row="0" Orientation="Horizontal" Margin="5 0 0 0">
  87. <TextBlock Text="Страна: " FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  88. <ComboBox x:Name="CountryCB" MinWidth="150" Margin="20"/>
  89. </StackPanel>
  90. <StackPanel Grid.Row="1" Orientation="Horizontal" Margin="5 0 0 0">
  91. <TextBlock Text="Номер телефона: " FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  92. <TextBox x:Name="PhoneNumberTBox" MinWidth="150" Margin="20" VerticalContentAlignment="Center" MaxLength="16"/>
  93. </StackPanel>
  94. <StackPanel Grid.Row="2" Orientation="Horizontal" Margin="5 0 0 0">
  95. <TextBlock Text="Email: " FontSize="16" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  96. <TextBox x:Name="EmailTBox" MinWidth="150" Margin="20" VerticalContentAlignment="Center" MaxLength="50"/>
  97. </StackPanel>
  98. <uc:LimitedTextBlock x:Name="AboutTBox" Grid.Row="3" Title="О себе:" MaxLength="255" TitleFontSize="16" Margin="0 0 10 10"/>
  99. </Grid>
  100. <!-- AcceptBtn -->
  101. <Button x:Name="AcceptBtn" Grid.Column="1" Grid.Row="1" Content="Сохранить изменения" FontSize="16" FontWeight="SemiBold" HorizontalAlignment="Right" MinWidth="200" Margin="0 20 20 20" Click="AcceptBtn_Click"/>
  102. </Grid>
  103. </Window>