AddPlayerInTeamWindow.xaml 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384
  1. <Window x:Class="Курсовой_проект_3._1.Windows.AddPlayerInTeamWindow"
  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:Курсовой_проект_3._1.Windows"
  7. mc:Ignorable="d"
  8. Title="AddPlayerInTeamWindow" Height="450" Width="600">
  9. <Window.Resources>
  10. <DataTemplate x:Key="PlayersItemTemplate">
  11. <Grid MinHeight="100">
  12. <Grid.ColumnDefinitions>
  13. <ColumnDefinition Width="0.4"/>
  14. <ColumnDefinition/>
  15. <ColumnDefinition/>
  16. <ColumnDefinition/>
  17. </Grid.ColumnDefinitions>
  18. <Border Grid.Column="0" BorderBrush="#68A4C8" BorderThickness="2" Margin="5">
  19. <Image Source="{Binding Path=PhotoPath}" Margin="3"/>
  20. </Border>
  21. <Grid Grid.Column="1">
  22. <Grid.RowDefinitions>
  23. <RowDefinition/>
  24. <RowDefinition/>
  25. <RowDefinition/>
  26. </Grid.RowDefinitions>
  27. <TextBlock Grid.Row="0" Text="{Binding Path=Nickname}" FontSize="14" FontWeight="SemiBold" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5 0 0 0"/>
  28. <TextBlock Grid.Row="1" Text="{Binding Path=Name}" FontSize="12" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5 0 0 0"/>
  29. </Grid>
  30. <Grid Grid.Column="2">
  31. <Grid.RowDefinitions>
  32. <RowDefinition/>
  33. <RowDefinition/>
  34. <RowDefinition/>
  35. </Grid.RowDefinitions>
  36. <Grid Grid.Row="0">
  37. <Grid.ColumnDefinitions>
  38. <ColumnDefinition Width="0.2"/>
  39. <ColumnDefinition/>
  40. </Grid.ColumnDefinitions>
  41. <StackPanel Grid.Column="0" Grid.ColumnSpan="2" Orientation="Horizontal">
  42. <TextBlock Text="Страна: " FontSize="12" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  43. <Image Source="{Binding Path=CountryIconPath}" MaxHeight="16" Margin="5 0 0 0"/>
  44. <TextBlock Text="{Binding Path=CountryName}" FontSize="12" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5 0 0 0"/>
  45. </StackPanel>
  46. </Grid>
  47. <StackPanel Grid.Row="1" Orientation="Horizontal">
  48. <TextBlock Text="Дисциплина: " FontSize="12" HorizontalAlignment="Left" VerticalAlignment="Center"/>
  49. <TextBlock Text="{Binding Path=DisciplineName}" FontSize="12" HorizontalAlignment="Left" VerticalAlignment="Center" Margin="5 0 0 0"/>
  50. </StackPanel>
  51. </Grid>
  52. </Grid>
  53. </DataTemplate>
  54. </Window.Resources>
  55. <Grid>
  56. <Grid.RowDefinitions>
  57. <RowDefinition Height="0.2*"/>
  58. <RowDefinition Height="0.2*"/>
  59. <RowDefinition/>
  60. </Grid.RowDefinitions>
  61. <!-- Title -->
  62. <TextBlock Grid.Row="0" Text="Поиск игрока" FontSize="24" FontWeight="SemiBold" HorizontalAlignment="Center" VerticalAlignment="Center"/>
  63. <!-- Search -->
  64. <StackPanel Grid.Row="1" Orientation="Horizontal" HorizontalAlignment="Center" VerticalAlignment="Center">
  65. <TextBlock Text="Поиск:" FontSize="14" HorizontalAlignment="Center" VerticalAlignment="Center" Margin="0 0 5 0"/>
  66. <TextBox x:Name="SearchTBox" MinWidth="300" HorizontalContentAlignment="Center" VerticalContentAlignment="Center" MaxLength="30" KeyDown="Search_KeyDown"/>
  67. </StackPanel>
  68. <!-- Listbox -->
  69. <Border Grid.Row="2" BorderBrush="#68A4C8" BorderThickness="2" Margin="40 20 40 20">
  70. <ListBox x:Name="SearchResultLB" ItemTemplate="{StaticResource PlayersItemTemplate}" MouseDoubleClick="SearchResultLB_MouseDoubleClick"/>
  71. </Border>
  72. </Grid>
  73. </Window>