UserPage.xaml 3.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. <Page x:Class="PsychoTest.Pages.UserPage"
  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:PsychoTest.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="1024" d:DesignWidth="1440"
  9. Title="UserPage">
  10. <Grid Background="#00A08A">
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="*"/>
  13. <RowDefinition Height="*"/>
  14. <RowDefinition Height="4*"/>
  15. </Grid.RowDefinitions>
  16. <Button Click="ExitToAuth" Margin="20,0,0,0" Content="Выйти" FontSize="35" Background="#C98100" Template="{StaticResource ButtonTemplate1}" HorizontalAlignment="Left" Height="100" Width="195"/>
  17. <Button Click="GoToAllTests" Margin="0,0,20,0" Background="#FFA400" Template="{StaticResource ButtonTemplate1}" HorizontalAlignment="Right" Height="135" Width="110">
  18. <Button.Content>
  19. <Image Width="90" Height="110" Source="/Resources/test_icon.png"/>
  20. </Button.Content>
  21. </Button>
  22. <TextBlock FontSize="45" HorizontalAlignment="Left" VerticalAlignment="Top" Grid.Row="1" Name="Fullname"/>
  23. <TextBlock HorizontalAlignment="Center" VerticalAlignment="Bottom" Text="Ваши тесты" FontSize="40" FontWeight="Bold" Grid.Row="1"/>
  24. <ListView Margin="0,10,0,10" Name="TestList" Grid.Row="2" Background="#0000" BorderThickness="0">
  25. <ListView.ItemsPanel>
  26. <ItemsPanelTemplate>
  27. <StackPanel Width="1400"/>
  28. </ItemsPanelTemplate>
  29. </ListView.ItemsPanel>
  30. <ListView.ItemTemplate>
  31. <DataTemplate>
  32. <Border VerticalAlignment="Center" CornerRadius="10" BorderThickness="2" BorderBrush="Black" Height="370" Width="1400">
  33. <Border.Background>
  34. <SolidColorBrush Color="White" Opacity="0.5"/>
  35. </Border.Background>
  36. <Grid Width="1400">
  37. <Grid.ColumnDefinitions>
  38. <ColumnDefinition Width="*"/>
  39. <ColumnDefinition Width="2*"/>
  40. </Grid.ColumnDefinitions>
  41. <Image Margin="60,0,0,0" Grid.Column="0" HorizontalAlignment="Left" Uid="{Binding Test_id}" Width="260" Height="260" Loaded="Image_Loaded"/>
  42. <StackPanel Grid.Column="1" HorizontalAlignment="Center">
  43. <TextBlock Margin="0,35,0,0" Text="{Binding Test_name}" FontSize="40" HorizontalAlignment="Center"/>
  44. <TextBlock Uid="{Binding Test_id}" Margin="0,20,0,0" TextWrapping="Wrap" Loaded="ResultFind" FontSize="20" HorizontalAlignment="Center"/>
  45. <TextBlock Margin="0,20,0,0" Text="{Binding StringFormat=Количество вопросов: {0}, Path=Questions_count}" FontSize="18" HorizontalAlignment="Center"/>
  46. <Button Uid="{Binding Test_id}" Click="GoToTestPage" Margin="0,20,0,0" Content="Перепройти тест" FontSize="30" Template="{DynamicResource ButtonTemplate1}" Width="540" Height="60" Background="#FFA400" BorderBrush="#0000"/>
  47. </StackPanel>
  48. </Grid>
  49. </Border>
  50. </DataTemplate>
  51. </ListView.ItemTemplate>
  52. </ListView>
  53. </Grid>
  54. </Page>