TestResult.axaml 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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.TestResult"
  7. xmlns:vm="using:EntranseTesting.ViewModels"
  8. x:DataType="vm:MainWindowViewModel">
  9. <ScrollViewer HorizontalScrollBarVisibility="Disabled" VerticalScrollBarVisibility="Auto">
  10. <StackPanel Margin="20 0" Background="Transparent" Spacing="5"
  11. HorizontalAlignment="Center" VerticalAlignment="Center">
  12. <TextBlock Text="Результат тестирования"
  13. HorizontalAlignment="Center" Classes="Header"
  14. Margin="0 0 0 15"/>
  15. <!-- Группа -->
  16. <TextBlock Text="{Binding TestMain.TestResults.Session.UserGroup, StringFormat='Группа: {0}'}"
  17. HorizontalAlignment="Right"/>
  18. <!-- Пользователь -->
  19. <TextBlock Text="{Binding TestMain.TestResults.Session.UserName, StringFormat='Пользователь: {0}'}"
  20. HorizontalAlignment="Right"/>
  21. <!-- Оценка -->
  22. <TextBlock Text="{Binding TestMain.TestResults.Session.Raiting, StringFormat='Оценка: {0}'}"
  23. HorizontalAlignment="Center" Classes="Header"
  24. Margin="0 15 0 0"/>
  25. <!-- Результат в числах -->
  26. <TextBlock Text="{Binding TestMain.TestResults.Session.CountCorrectly}"
  27. HorizontalAlignment="Center" Classes="Header"
  28. Margin="0 0 0 15"/>
  29. <!-- Результат в процентах -->
  30. <TextBlock Text="{Binding TestMain.TestResults.Session.ProcentCorrectly, StringFormat='Правильных ответов {0}%'}"
  31. HorizontalAlignment="Stretch"/>
  32. <!-- Кнопка выйти -->
  33. <Button HorizontalAlignment="Center"
  34. Command="{Binding ToBackCommand}" Margin="5"
  35. VerticalAlignment="Bottom"
  36. Content="Вернуться на главную"/>
  37. </StackPanel>
  38. </ScrollViewer>
  39. </UserControl>