123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- <Page x:Class="MyTests.Pages.EditTestPage"
- xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
- xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
- xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
- xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
- xmlns:local="clr-namespace:MyTests.Pages"
- mc:Ignorable="d"
- d:DesignHeight="450"
- d:DesignWidth="676"
- Background="{StaticResource color1}">
- <Grid>
- <Grid.RowDefinitions>
- <RowDefinition Height="50"/>
- <RowDefinition/>
- <RowDefinition Height="50"/>
- </Grid.RowDefinitions>
- <StackPanel Orientation="Horizontal">
- <Image Name="TestImg"
- MinHeight="35"
- MinWidth="35"
- Source="/MyTests;component/Resources/Approval.png"
- Margin="7"
- MouseDown="TestImg_MouseDown">
- </Image>
- <TextBox Name="TestNameBox"
- Text="Тест"
- FontSize="25"
- BorderBrush="{x:Null}"
- LostFocus="TestNameBox_LostFocus">
- </TextBox>
- <Label Content=" - редактирование"
- FontSize="25"
- Foreground="LightGray"
- Opacity="0.5">
- </Label>
- </StackPanel>
- <ScrollViewer Grid.Row="1">
- <StackPanel>
- <StackPanel Orientation="Horizontal">
- <Label Content="Тест виден другим пользователям:"
- FontSize="14"/>
- <CheckBox Name="IsVisibleCB"
- VerticalContentAlignment="Center"
- Click="SaveInfoCB">
- </CheckBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <Label Content="Пользователь может посмотреть свои ответы:"
- FontSize="14"/>
- <CheckBox Name="IsAnswersVisibleCB"
- VerticalContentAlignment="Center"
- Click="SaveInfoCB">
- </CheckBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal">
- <Label Content="Пользователь может пройти тест повторно:"
- FontSize="14"/>
- <CheckBox Name="CanAgainCB"
- VerticalContentAlignment="Center"
- Click="SaveInfoCB">
- </CheckBox>
- </StackPanel>
- <StackPanel Orientation="Horizontal"
- Height="30"
- Margin="0,10,0,10">
- <Button Content="Добавить вопрос"
- Width="300"
- Margin="15,0,15,0"
- Click="AddQuestionButton_Click"/>
- <Button Content="Удалить вопрос"
- Width="300"
- Margin="15,0,15,0"
- Click="DeleteQuestionButton_Click"/>
- </StackPanel>
- <ListBox Name="QuestionsListBox"
- Grid.Row="1"
- Background="{StaticResource color1}"
- BorderBrush="{x:Null}"
- SelectionChanged="QuestionsListBox_SelectionChanged"
- ScrollViewer.HorizontalScrollBarVisibility="Disabled"
- ScrollViewer.VerticalScrollBarVisibility="Hidden">
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border Width="{Binding Path=ActualWidth, ElementName=QuestionsListBox}"
- Height="45"
- CornerRadius="10"
- Background="{StaticResource color2}">
- <StackPanel Orientation="Horizontal">
- <Image Width="30"
- Height="30"
- Margin="10,5,5,5"
- HorizontalAlignment="Left"
- Source="/MyTests;component/Resources/Question-mark.png">
- </Image>
- <StackPanel>
- <Label Content="{Binding Content}"/>
- <TextBlock Margin="5,-6,0,0">
- <Run Text="Ответ: " Foreground="LightGray"/>
- <Run Text="{Binding Answer}" />
- </TextBlock>
- </StackPanel>
- </StackPanel>
- </Border>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </StackPanel>
- </ScrollViewer>
- <Button Grid.Row="2"
- Content="Назад"
- Width="120"
- Height="40"
- FontSize="20"
- Click="BackButton_Click">
- </Button>
- </Grid>
- </Page>
|