GameCreateFriendView.axaml 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  1. <UserControl xmlns="https://github.com/avaloniaui"
  2. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  3. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. mc:Ignorable="d" d:DesignWidth="1200" d:DesignHeight="800"
  6. x:Class="HelloItQuantum.Views.GameCreateFriendView"
  7. x:DataType="vm:MainWindowViewModel"
  8. xmlns:vm="using:HelloItQuantum.ViewModels">
  9. <UserControl.Styles>
  10. <Style Selector="TextBlock">
  11. <Setter Property="FontFamily" Value="{StaticResource BankGothicMediumRUS}"/>
  12. <Setter Property="FontSize" Value="26"/>
  13. </Style>
  14. <Style Selector="Button">
  15. <Setter Property="FontFamily" Value="{StaticResource BankGothicMediumRUS}"/>
  16. <Setter Property="FontSize" Value="26"/>
  17. <Setter Property="CornerRadius" Value="10"/>
  18. <Setter Property="HorizontalContentAlignment" Value="Center"/>
  19. </Style>
  20. <Style Selector="ComboBox">
  21. <Setter Property="Background" Value="#E6EFD8"/>
  22. <Setter Property="CornerRadius" Value="10"/>
  23. <Setter Property="VerticalAlignment" Value="Center"/>
  24. <Setter Property="BorderBrush" Value="Transparent"/>
  25. </Style>
  26. </UserControl.Styles>
  27. <Panel Background="#006838">
  28. <Grid ColumnDefinitions="auto, auto" RowDefinitions="*, auto" Margin="10 20" HorizontalAlignment="Center">
  29. <Grid Grid.Column="0" Grid.Row="0" ColumnDefinitions="60, 200, 20, 140, 20, 300, 40" RowDefinitions="auto, 10, *">
  30. <Border Grid.Column="1" Grid.Row="0" CornerRadius="10" Background="#E6EFD8">
  31. <TextBlock Text="Фигура" VerticalAlignment="Stretch" Margin="10" TextAlignment="Center"/>
  32. </Border>
  33. <Border Grid.Column="3" Grid.Row="0" CornerRadius="10" Background="#E6EFD8">
  34. <TextBlock Text="Цвет" VerticalAlignment="Stretch" Margin="10" TextAlignment="Center"/>
  35. </Border>
  36. <Border Grid.Column="5" Grid.Row="0" CornerRadius="10" Background="#E6EFD8">
  37. <TextBlock Text="Положение" VerticalAlignment="Stretch" Margin="10" TextAlignment="Center"/>
  38. </Border>
  39. <ScrollViewer Grid.ColumnSpan="7" Grid.Row="2" VerticalAlignment="Top" Margin="0 0 20 0">
  40. <Grid RowDefinitions="auto, auto">
  41. <ItemsControl Grid.Row="0" ItemsSource="{Binding GameCreateFriendVM.ListElements}">
  42. <ItemsControl.ItemTemplate>
  43. <DataTemplate>
  44. <Grid ColumnDefinitions="40, 20, *, 20" Margin="0 10">
  45. <Button Grid.Column="0" Background="#F26527" Width="40" Command="{Binding Delete}" VerticalAlignment="Stretch">
  46. <Svg Path="/Assets/ImgCreateFriend/delete.svg" Width="20"/>
  47. </Button>
  48. <Border Grid.Column="2" CornerRadius="10"
  49. Background="#7CBE41"
  50. HorizontalAlignment="Stretch"
  51. Padding="10">
  52. <StackPanel Orientation="Horizontal">
  53. <ComboBox ItemsSource="{Binding CbElement}" SelectedIndex="{Binding SelectedElementIndex}"
  54. Width="180" Height="125" Margin="0 0 40 0"/>
  55. <ComboBox ItemsSource="{Binding CbColor}" SelectedIndex="{Binding SelectedColorIndex}"
  56. Width="120" Height="125" Margin="0 0 40 0"/>
  57. <ComboBox ItemsSource="{Binding CbNavigateOne}" SelectedIndex="{Binding SelectedNavigateOne}" IsVisible="{Binding IsVisibleNavigateOne}"
  58. Width="130" Height="125" Margin="0 0 10 0"/>
  59. <ComboBox ItemsSource="{Binding CbNavigateTwo}" SelectedIndex="{Binding SelectedNavigateTwo}" IsVisible="{Binding IsVisibleNavigateTwo}"
  60. Width="130" Height="125"/>
  61. </StackPanel>
  62. </Border>
  63. </Grid>
  64. </DataTemplate>
  65. </ItemsControl.ItemTemplate>
  66. </ItemsControl>
  67. <Button Grid.Row="1" Content="+" Command="{Binding GameCreateFriendVM.ClickCreateElement}"
  68. Background="#E6EFD8" Margin="60 0 20 0" HorizontalAlignment="Stretch"/>
  69. </Grid>
  70. </ScrollViewer>
  71. </Grid>
  72. <Panel Grid.Column="1" Grid.Row="0" HorizontalAlignment="Left" VerticalAlignment="Center" Width="400">
  73. <Image Source="/Assets/ImgCreateFriend/img_friend.png" Width="400"/>
  74. <Image Source="/Assets/ImgCreateFriend/hello.png" Width="150" Margin="0 0 140 -100"
  75. IsVisible="{Binding GameCreateFriendVM.IsVisibleHello}"/>
  76. <ContentControl Width="140" Height="180" HorizontalAlignment="Right" VerticalAlignment="Bottom"
  77. Margin="0 0 40 40" Content="{Binding GameCreateFriendVM.PChildrens}"/>
  78. </Panel>
  79. <Button Grid.ColumnSpan="2" Grid.Row="1"
  80. Command="{Binding GameCreateFriendVM.ClickCreateFriend}"
  81. Content="{Binding GameCreateFriendVM.BtnContent}"
  82. HorizontalAlignment="Stretch"
  83. Margin="0 30"
  84. Background="{Binding GameCreateFriendVM.BtnColor}"/>
  85. </Grid>
  86. <Button Command="{Binding GameCreateFriendVM.GoBack}" Width="50" Height="50" VerticalAlignment="Top" CornerRadius="10000" Padding="1" Margin="10 20">
  87. <Image Source="/Assets/КнопкаНазад.png"/>
  88. </Button>
  89. </Panel>
  90. </UserControl>