1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <Page x:Class="MyTests.Pages.TestsCatalog"
- 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="800">
- <Grid Background="{StaticResource color1}">
- <Grid.RowDefinitions>
- <RowDefinition Height="64"/>
- <RowDefinition/>
- </Grid.RowDefinitions>
- <Border CornerRadius="15"
- Background="{StaticResource color2}"
- Margin="5">
- <StackPanel Orientation="Horizontal"
- HorizontalAlignment="Center">
- <Button Name="AddTestButton"
- Height="45"
- Width="45"
- Content="+"
- FontSize="30"
- Click="AddTest_Click"
- Visibility="Collapsed">
- </Button>
- <StackPanel Orientation="Horizontal"
- Grid.Row="0"
- HorizontalAlignment="Center">
- <TextBox Name="TestNameBox"
- Margin="5"
- Width="200"
- Text="Название теста">
- </TextBox>
- <TextBox Name="AuthorTestBox"
- Margin="5"
- Width="200"
- Text="Автор">
- </TextBox>
- </StackPanel>
- <Button Height="45"
- Width="45"
- Click="FindTests_Click">
- <Image Source="/MyTests;component/Resources/search.png"
- Margin="10"/>
- </Button>
- </StackPanel>
- </Border>
- <ListBox Name="TestsListBox"
- Grid.Row="1"
- Background="{StaticResource color1}"
- BorderBrush="{x:Null}">
- <ScrollViewer VerticalScrollBarVisibility="Visible"/>
- <ListBox.ItemTemplate>
- <DataTemplate>
- <Border Width="{Binding Path=ActualWidth, ElementName=TestsListBox}"
- Margin="-10,0,0,0"
- Height="45"
- CornerRadius="10"
- Background="{StaticResource color2}"
- MouseDown="TestsListBox_Selected">
- <StackPanel Orientation="Horizontal">
- <Image Width="30"
- Height="30"
- Margin="10,5,5,5"
- HorizontalAlignment="Left"
- Source="/MyTests;component/Resources/approval.png">
- </Image>
- <StackPanel>
- <StackPanel Orientation="Horizontal">
- <Label Content="{Binding Name}"/>
- <Label Content="{Binding Users.Login}"/>
- </StackPanel>
- <TextBlock Margin="0,-7,0,0">
- <Run Text="Вопросов: " Foreground="White"/>
- <Run Text="{Binding Questions.Count, Mode=OneTime}" />
- </TextBlock>
- </StackPanel>
- </StackPanel>
- </Border>
- </DataTemplate>
- </ListBox.ItemTemplate>
- </ListBox>
- </Grid>
- </Page>
|