TestPage.xaml 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. <Page x:Class="MyTests.Pages.TestPage"
  2. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  4. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:local="clr-namespace:MyTests.Pages"
  7. mc:Ignorable="d"
  8. d:DesignHeight="450"
  9. d:DesignWidth="800">
  10. <Grid Background="{StaticResource color1}">
  11. <Grid.RowDefinitions>
  12. <RowDefinition Height="50"/>
  13. <RowDefinition/>
  14. </Grid.RowDefinitions>
  15. <StackPanel Orientation="Horizontal"
  16. HorizontalAlignment="Left">
  17. <Image Name="TestImg"
  18. Source="/MyTests;component/Resources/Approval.png"
  19. Margin="7">
  20. </Image>
  21. <Label Name="TestName"
  22. Content="Название теста"
  23. FontSize="25">
  24. </Label>
  25. </StackPanel>
  26. <StackPanel Orientation="Horizontal"
  27. HorizontalAlignment="Right">
  28. <Label Content="by"
  29. FontSize="25">
  30. </Label>
  31. <Image Name="AuthorImg"
  32. Source="/MyTests;component/Resources/StandartImage.png"
  33. Margin="7">
  34. </Image>
  35. <Label Name="AuthorName"
  36. Content="Автор"
  37. FontSize="25">
  38. </Label>
  39. </StackPanel>
  40. <ListBox Name="TestsListBox"
  41. Background="{StaticResource color1}"
  42. BorderBrush="{Binding TestsListBox}"
  43. Grid.Row="1">
  44. <ScrollViewer VerticalScrollBarVisibility="Visible"/>
  45. <ListBox.ItemTemplate>
  46. <DataTemplate>
  47. <Border Width="{Binding Path=ActualWidth, ElementName=TestsListBox}"
  48. Height="50"
  49. CornerRadius="10"
  50. Background="{StaticResource color2}"
  51. MouseDown="TestsListBox_Selected">
  52. <StackPanel>
  53. <Label Content="{Binding Content}"/>
  54. <TextBox Name="Testing"
  55. Text="Ответ:"/>
  56. </StackPanel>
  57. </Border>
  58. </DataTemplate>
  59. </ListBox.ItemTemplate>
  60. </ListBox>
  61. </Grid>
  62. </Page>