123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129 |
- <UserControl xmlns="https://github.com/avaloniaui"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
- x:Class="EntranseTesting.TestMatchTheElement"
- x:DataType="vm:MainWindowViewModel"
- xmlns:vm="using:EntranseTesting.ViewModels">
- <ScrollViewer HorizontalScrollBarVisibility="Auto" VerticalScrollBarVisibility="Auto">
- <StackPanel Margin="20 0" Spacing="15" Background="Transparent">
- <!-- Задание -->
- <TextBlock Text="{Binding TestMain.TestPages.TestME.Question}"
- VerticalAlignment="Top"
- HorizontalAlignment="Stretch"
- TextWrapping="Wrap"/>
- <!-- Картинки -->
- <ItemsRepeater ItemsSource="{Binding TestMain.TestPages.TestME.QImage}"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Stretch">
- <ItemsRepeater.Layout>
- <WrapLayout HorizontalSpacing="15" VerticalSpacing="5" Orientation="Horizontal"/>
- </ItemsRepeater.Layout>
- <ItemsRepeater.ItemTemplate>
- <DataTemplate>
- <Image Source="{Binding qImage}" Classes="Test"/>
- </DataTemplate>
- </ItemsRepeater.ItemTemplate>
- </ItemsRepeater>
- <!-- Контейнер с элементами для соотношения -->
- <Grid Name="MainContainer"
- ColumnDefinitions="Auto,*,Auto"
- HorizontalAlignment="Stretch">
- <!--// Элементы 1 группы //-->
- <StackPanel Orientation="Vertical" Grid.Column="0">
- <TextBlock Text="{Binding TestMain.TestPages.TestME.NameGroup1}"
- TextAlignment="Center"
- VerticalAlignment="Top"
- HorizontalAlignment="Center"
- TextWrapping="Wrap"/>
- <ItemsRepeater ItemsSource="{Binding TestMain.TestPages.TestME.ElementMatchGroup1}" Margin="15"
- VerticalAlignment="Center"
- HorizontalAlignment="Left">
- <ItemsRepeater.Layout>
- <StackLayout Spacing="10" Orientation="Vertical"/>
- </ItemsRepeater.Layout>
- <ItemsRepeater.ItemTemplate>
- <DataTemplate>
- <StackPanel Spacing="10" Orientation="Horizontal"
- HorizontalAlignment="Stretch" VerticalAlignment="Stretch">
- <Border Padding="10 5"
- Background="#cfd7ff" CornerRadius="5"
- Cursor="Hand" PointerPressed="OnPointerPressed"
- Classes="CAFS">
- <TextBlock Text="{Binding Name}"
- TextAlignment="Center"
- VerticalAlignment="Center"
- TextWrapping="Wrap"/>
- </Border>
- <Border Background="#cfd7ff"
- IsVisible="{Binding IsActive}"
- CornerRadius="5"
- Padding="10 5"
- Width="50">
- <TextBlock Text="{Binding NumGroup}"
- TextAlignment="Center"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Center"/>
- </Border>
- </StackPanel>
- </DataTemplate>
- </ItemsRepeater.ItemTemplate>
- </ItemsRepeater>
- </StackPanel>
- <!--// Элементы 2 группы//-->
- <StackPanel Orientation="Vertical" Grid.Column="2">
- <TextBlock Text="{Binding TestMain.TestPages.TestME.NameGroup1}"
- TextAlignment="Center"
- VerticalAlignment="Top"
- HorizontalAlignment="Center"
- TextWrapping="Wrap"/>
- <ItemsRepeater ItemsSource="{Binding TestMain.TestPages.TestME.ElementMatchGroup2}" Margin="15"
- VerticalAlignment="Center"
- HorizontalAlignment="Right">
- <ItemsRepeater.Layout>
- <StackLayout Spacing="10" Orientation="Vertical"/>
- </ItemsRepeater.Layout>
- <ItemsRepeater.ItemTemplate>
- <DataTemplate>
- <StackPanel Spacing="10" Orientation="Horizontal"
- HorizontalAlignment="Right">
- <Border Background="#cfd7ff"
- IsVisible="{Binding IsActive}"
- Padding="10 5"
- Width="50"
- CornerRadius="5">
- <TextBlock Text="{Binding NumGroup}"
- TextAlignment="Center"
- HorizontalAlignment="Stretch"
- VerticalAlignment="Center"/>
- </Border>
- <Border Background="#cfd7ff" CornerRadius="5"
- Cursor="Hand" Padding="10 5"
- Classes="CAFS"
- PointerPressed="OnPointerPressed">
- <TextBlock Text="{Binding Name}"
- TextAlignment="Left"
- VerticalAlignment="Center"
- TextWrapping="Wrap"/>
- </Border>
- </StackPanel>
- </DataTemplate>
- </ItemsRepeater.ItemTemplate>
- </ItemsRepeater>
- </StackPanel>
- </Grid>
- </StackPanel>
- </ScrollViewer>
- </UserControl>
|