TestChoosingAnAnswerFromASet.axaml 2.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  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.TestChoosingAnAnswerFromASet" x:DataType="vm:MainWindowViewModel"
  7. xmlns:vm="using:EntranseTesting.ViewModels">
  8. <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
  9. <StackPanel Margin="20 0" Spacing="15" Background="Transparent">
  10. <!-- Задание -->
  11. <TextBlock Text="{Binding TestMain.TestPages.TestCAFS.Question}"
  12. IsVisible="{Binding TestMain.TestPages.TestCAFS.QuestionVisible}"
  13. VerticalAlignment="Top"
  14. HorizontalAlignment="Stretch"
  15. TextWrapping="Wrap"/>
  16. <!-- Картинки -->
  17. <ItemsRepeater ItemsSource="{Binding TestMain.TestPages.TestCAFS.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.TestCAFS.Element}" Margin="15"
  31. VerticalAlignment="Center"
  32. HorizontalAlignment="Stretch">
  33. <ItemsRepeater.Layout>
  34. <WrapLayout Orientation="Horizontal"/>
  35. </ItemsRepeater.Layout>
  36. <ItemsRepeater.ItemTemplate>
  37. <DataTemplate>
  38. <WrapPanel Orientation="Horizontal" Margin="0 0 0 5">
  39. <TextBlock Text="{Binding Text}"
  40. IsVisible="{Binding VisibleText}"
  41. VerticalAlignment="Center"/>
  42. <ComboBox ItemsSource="{Binding CollectionElement}"
  43. SelectedItem="{Binding SelectedItem}"
  44. Margin="10 0"/>
  45. </WrapPanel>
  46. </DataTemplate>
  47. </ItemsRepeater.ItemTemplate>
  48. </ItemsRepeater>
  49. </StackPanel>
  50. </ScrollViewer>
  51. </UserControl>