CheckTestResults.xaml 2.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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. HorizontalAlignment="Left">
  17. <Image Name="TestImg"
  18. Source="/MyTests;component/Resources/Approval.png"
  19. Margin="7">
  20. </Image>
  21. <Label Name="TestName"
  22. Content="Название теста"
  23. FontSize="25">
  24. </Label>
  25. </StackPanel>
  26. <ListBox Name="TestsListBox"
  27. Background="{StaticResource color1}"
  28. BorderBrush="{Binding TestsListBox}"
  29. Grid.Row="1">
  30. <ScrollViewer VerticalScrollBarVisibility="Visible"/>
  31. <ListBox.ItemTemplate>
  32. <DataTemplate>
  33. <Border Width="{Binding Path=ActualWidth, ElementName=TestsListBox}"
  34. Height="50"
  35. CornerRadius="10"
  36. Background="{StaticResource color2}">
  37. <StackPanel Orientation="Horizontal">
  38. <Label MinWidth="30"
  39. Content="{Binding RelativeSource={RelativeSource Mode=TemplatedParent},
  40. Path=(ItemsControl.AlternationIndex)}"
  41. VerticalContentAlignment="Center"
  42. HorizontalContentAlignment="Center">
  43. </Label>
  44. <StackPanel>
  45. <Label Content="{Binding Questions.Content}"/>
  46. <TextBlock>
  47. <Run Text="Ответ: " Foreground="LightGray"/>
  48. <Run Text="{Binding Answer}" Foreground="White"/>
  49. </TextBlock>
  50. </StackPanel>
  51. </StackPanel>
  52. </Border>
  53. </DataTemplate>
  54. </ListBox.ItemTemplate>
  55. </ListBox>
  56. </Grid>
  57. </Page>