RandomLevelView.axaml 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <UserControl
  2. x:Class="ShakerApp.Views.RandomLevelView"
  3. xmlns="https://github.com/avaloniaui"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  6. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  7. xmlns:vm="using:ShakerApp.ViewModels"
  8. d:DesignHeight="450"
  9. d:DesignWidth="800"
  10. x:DataType="vm:RandomMainPageViewModel"
  11. DataContext="{Binding Source={x:Static vm:RandomMainPageViewModel.Instance}}"
  12. mc:Ignorable="d">
  13. <StackPanel>
  14. <StackPanel>
  15. <TextBlock>
  16. <Run Text="{DynamicResource CurrentTestLevel}" />
  17. <Run Text=":" />
  18. </TextBlock>
  19. <TextBlock
  20. FontSize="24"
  21. FontWeight="Black"
  22. Text="{Binding CurrentTestLevel, StringFormat={}{0:F2}dB}" />
  23. </StackPanel>
  24. <StackPanel>
  25. <TextBlock>
  26. <Run Text="{DynamicResource CurrentTestTime}" />
  27. <Run Text=":" />
  28. </TextBlock>
  29. <TextBlock
  30. FontSize="24"
  31. FontWeight="Black"
  32. Text="{Binding CurrentTestTime, Converter={StaticResource TimeToStringConverter}}" />
  33. </StackPanel>
  34. <StackPanel>
  35. <TextBlock>
  36. <Run Text="{DynamicResource CurrentLevelTestMaxTime}" />
  37. <Run Text=":" />
  38. </TextBlock>
  39. <TextBlock
  40. FontSize="24"
  41. FontWeight="Black"
  42. Text="{Binding CurrentLevelTestMaxTime, Converter={StaticResource TimeToStringConverter}}" />
  43. </StackPanel>
  44. <Button Foreground="Green" IsEnabled="{Binding NextButtonIsEnabled}">
  45. <StackPanel>
  46. <PathIcon Data="{StaticResource NextLevelGeometry}" Foreground="Green" />
  47. <TextBlock Foreground="Green" Text="{DynamicResource NextLevel}" />
  48. </StackPanel>
  49. </Button>
  50. </StackPanel>
  51. </UserControl>