TestMatchTheValue.axaml 2.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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.TestMatchTheValue"
  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.TestMV.Question}"
  13. VerticalAlignment="Top"
  14. HorizontalAlignment="Stretch"
  15. TextWrapping="Wrap"/>
  16. <!-- Картинки -->
  17. <ItemsRepeater ItemsSource="{Binding TestMain.TestPages.TestMV.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.TestMV.Elements}" Margin="15"
  31. VerticalAlignment="Center"
  32. HorizontalAlignment="Center">
  33. <ItemsRepeater.Layout>
  34. <StackLayout Spacing="10" Orientation="Vertical"/>
  35. </ItemsRepeater.Layout>
  36. <ItemsRepeater.ItemTemplate>
  37. <DataTemplate>
  38. <Grid ColumnDefinitions="*,Auto,*">
  39. <ComboBox ItemsSource="{Binding Values}" SelectedItem="{Binding Elem1}"
  40. Grid.Column="0"
  41. HorizontalAlignment="Right"
  42. TextBlock.TextWrapping="Wrap"
  43. Margin="10 5"/>
  44. <TextBlock Text="="
  45. Grid.Column="1"
  46. HorizontalAlignment="Center"
  47. VerticalAlignment="Center"
  48. Margin="20 5"/>
  49. <ComboBox ItemsSource="{Binding Values}" SelectedItem="{Binding Elem2}"
  50. Grid.Column="2"
  51. HorizontalAlignment="Left"
  52. TextBlock.TextWrapping="Wrap"
  53. Margin="10 5"/>
  54. </Grid>
  55. </DataTemplate>
  56. </ItemsRepeater.ItemTemplate>
  57. </ItemsRepeater>
  58. </StackPanel>
  59. </ScrollViewer>
  60. </UserControl>