TestChoosing1Answer.axaml 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  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="800" d:DesignHeight="450"
  6. x:Class="EntranseTesting.TestChoosing1Answer"
  7. x:DataType="vm:MainWindowViewModel"
  8. xmlns:vm="using:EntranseTesting.ViewModels">
  9. <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
  10. <StackPanel Margin="20 0" Spacing="15" Background="Transparent">
  11. <!-- Задание -->
  12. <TextBlock Text="{Binding TestMain.TestPages.TestC1A.Question}"
  13. VerticalAlignment="Top"
  14. HorizontalAlignment="Stretch"
  15. TextWrapping="Wrap"/>
  16. <!-- Картинки -->
  17. <ItemsRepeater ItemsSource="{Binding TestMain.TestPages.TestC1A.QImage}"
  18. HorizontalAlignment="Stretch"
  19. VerticalAlignment="Stretch">
  20. <ItemsRepeater.Layout>
  21. <WrapLayout HorizontalSpacing="15" VerticalSpacing="5" Orientation="Horizontal"/>
  22. </ItemsRepeater.Layout>
  23. <ItemsRepeater.ItemTemplate>
  24. <DataTemplate>
  25. <Image Source="{Binding qImage}" Classes="Test"/>
  26. </DataTemplate>
  27. </ItemsRepeater.ItemTemplate>
  28. </ItemsRepeater>
  29. <!-- Контейнер с элементами выбора -->
  30. <ItemsRepeater ItemsSource="{Binding TestMain.TestPages.TestC1A.Element}" Margin="15"
  31. VerticalAlignment="Center"
  32. HorizontalAlignment="Stretch">
  33. <ItemsRepeater.Layout>
  34. <StackLayout Spacing="10" Orientation="Vertical"/>
  35. </ItemsRepeater.Layout>
  36. <ItemsRepeater.ItemTemplate>
  37. <DataTemplate>
  38. <RadioButton Content="{Binding Name}"
  39. IsChecked="{Binding UserCorrectly}"
  40. TextBlock.TextWrapping="Wrap"/>
  41. </DataTemplate>
  42. </ItemsRepeater.ItemTemplate>
  43. </ItemsRepeater>
  44. </StackPanel>
  45. </ScrollViewer>
  46. </UserControl>