CheckTestResults.xaml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. <Page x:Class="MyTests.Pages.CheckTestResults"
  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:MyTests.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450"
  9. d:DesignWidth="676">
  10. <Grid Background="{StaticResource color1}">
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="50"/>
  13. <RowDefinition/>
  14. </Grid.RowDefinitions>
  15. <StackPanel Orientation="Horizontal">
  16. <Image Name="TestImg"
  17. Source="/MyTests;component/Resources/Approval.png"
  18. Margin="7">
  19. </Image>
  20. <Label Name="TestName"
  21. Content="Название теста"
  22. FontSize="25">
  23. </Label>
  24. </StackPanel>
  25. <StackPanel Orientation="Horizontal"
  26. HorizontalAlignment="Right">
  27. <Label Content="Прошел:"
  28. FontSize="20">
  29. </Label>
  30. <Image Name="AuthorImg"
  31. Source="/MyTests;component/Resources/StandartImage.png"
  32. Margin="7">
  33. </Image>
  34. <Label Name="PassedLabel"
  35. Content="USER"
  36. FontSize="20"
  37. MouseDown="PassedLabel_MouseDown">
  38. </Label>
  39. </StackPanel>
  40. <ListBox Name="AnswersListBox"
  41. Background="{StaticResource color1}"
  42. BorderBrush="{Binding TestsListBox}"
  43. Grid.Row="1">
  44. <ScrollViewer VerticalScrollBarVisibility="Visible"/>
  45. <ListBox.ItemTemplate>
  46. <DataTemplate>
  47. <Border Width="{Binding Path=ActualWidth, ElementName=AnswersListBox}"
  48. Height="50"
  49. CornerRadius="10"
  50. Background="{StaticResource color2}">
  51. <StackPanel Orientation="Horizontal">
  52. <Label MinWidth="30"
  53. Content="{Binding AnswerNum}"
  54. VerticalContentAlignment="Center"
  55. HorizontalContentAlignment="Center">
  56. </Label>
  57. <StackPanel>
  58. <Label Content="{Binding Answer.Questions.Content}"/>
  59. <TextBlock>
  60. <Run Text="Ответ: " Foreground="LightGray"/>
  61. <Run Text="{Binding Answer.Answer}" Foreground="White"/>
  62. </TextBlock>
  63. </StackPanel>
  64. </StackPanel>
  65. </Border>
  66. </DataTemplate>
  67. </ListBox.ItemTemplate>
  68. </ListBox>
  69. </Grid>
  70. </Page>