MainPage.xaml 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. <Page
  2. x:Class="YJMPD_UWP.MainPage"
  3. xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
  4. xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
  5. xmlns:local="using:YJMPD_UWP"
  6. xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
  7. xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
  8. mc:Ignorable="d">
  9. <Page.Resources>
  10. <Style x:Key="NavStackPanel" TargetType="StackPanel">
  11. <Setter Property="Orientation" Value="Horizontal" />
  12. <Setter Property="VerticalAlignment" Value="Center" />
  13. <Setter Property="MinWidth" Value="275" />
  14. </Style>
  15. <Style x:Key="NavIcon" TargetType="TextBlock">
  16. <Setter Property="FontFamily" Value="Segoe MDL2 Assets" />
  17. <Setter Property="FontSize" Value="28" />
  18. <Setter Property="Margin" Value="0,5,0,0" />
  19. </Style>
  20. <Style x:Key="NavText" TargetType="TextBlock">
  21. <Setter Property="FontSize" Value="28" />
  22. <Setter Property="Margin" Value="18,0,0,0" />
  23. </Style>
  24. <Style x:Key="GPSInfoPanel" TargetType="StackPanel">
  25. <Setter Property="Orientation" Value="Horizontal" />
  26. <Setter Property="VerticalAlignment" Value="Center" />
  27. <Setter Property="Margin" Value="10,0,10,0" />
  28. </Style>
  29. <Style x:Key="GPSInfoIcon" TargetType="TextBlock">
  30. <Setter Property="FontFamily" Value="Segoe MDL2 Assets" />
  31. <Setter Property="FontSize" Value="20" />
  32. <Setter Property="Margin" Value="5,5,0,0" />
  33. </Style>
  34. <Style x:Key="GPSInfoText" TargetType="TextBlock">
  35. <Setter Property="FontSize" Value="20" />
  36. <Setter Property="Margin" Value="15,0,0,0" />
  37. </Style>
  38. </Page.Resources>
  39. <Grid>
  40. <Grid.RowDefinitions>
  41. <RowDefinition Height="Auto" />
  42. <RowDefinition Height="*" />
  43. </Grid.RowDefinitions>
  44. <RelativePanel Grid.Row="0">
  45. <Button RelativePanel.AlignLeftWithPanel="True" Name="NavButton" Click="NavButton_Click" VerticalAlignment="Stretch" FontFamily="Segoe MDL2 Assets" Content="&#xE700;" FontSize="28" />
  46. <Viewbox RelativePanel.RightOf="NavButton" RelativePanel.AlignBottomWith="NavButton" StretchDirection="DownOnly" Stretch="UniformToFill" Margin="10,0,10,0">
  47. <TextBlock FontSize="28" Name="PageTitle" Text="{Binding Map}" />
  48. </Viewbox>
  49. </RelativePanel>
  50. <SplitView Grid.Row="1" Name="NavView" DisplayMode="Overlay" OpenPaneLength="275">
  51. <SplitView.Pane>
  52. <RelativePanel VerticalAlignment="Stretch"
  53. ManipulationMode="TranslateX"
  54. ManipulationCompleted="Pane_ManipulationCompleted" Style="{ThemeResource DarkModeFix}">
  55. <Viewbox Stretch="Uniform" StretchDirection="DownOnly" HorizontalAlignment="Stretch" RelativePanel.AlignTopWithPanel="True">
  56. <ListBox SelectionMode="Single" Name="NavList" SelectionChanged="NavList_SelectionChanged" Tapped="NavList_Tapped">
  57. <ListBoxItem Name="NavListMap" ManipulationMode="TranslateX" ManipulationCompleted="Pane_ManipulationCompleted">
  58. <StackPanel Style="{StaticResource NavStackPanel}">
  59. <TextBlock Style="{StaticResource NavIcon}" Text="&#xE909;"/>
  60. <TextBlock Style="{StaticResource NavText}" Text="{Binding Map}"/>
  61. </StackPanel>
  62. </ListBoxItem>
  63. <ListBoxItem Name="NavListRoute" ManipulationMode="TranslateX" ManipulationCompleted="Pane_ManipulationCompleted">
  64. <StackPanel Style="{StaticResource NavStackPanel}">
  65. <TextBlock Style="{StaticResource NavIcon}" Text="&#xE7AD;"/>
  66. <TextBlock Style="{StaticResource NavText}" Text="{Binding Route}"/>
  67. </StackPanel>
  68. </ListBoxItem>
  69. <ListBoxItem Name="NavListLandmarks" ManipulationMode="TranslateX" ManipulationCompleted="Pane_ManipulationCompleted">
  70. <StackPanel Style="{StaticResource NavStackPanel}">
  71. <TextBlock Style="{StaticResource NavIcon}" Text="&#xE913;"/>
  72. <TextBlock Style="{StaticResource NavText}" Text="{Binding Landmarks}" />
  73. </StackPanel>
  74. </ListBoxItem>
  75. <ListBoxItem Name="NavListHelp" ManipulationMode="TranslateX" ManipulationCompleted="Pane_ManipulationCompleted">
  76. <StackPanel Style="{StaticResource NavStackPanel}">
  77. <TextBlock Style="{StaticResource NavIcon}" Text="&#xE897;"/>
  78. <TextBlock Style="{StaticResource NavText}" Text="{Binding Help}"/>
  79. </StackPanel>
  80. </ListBoxItem>
  81. <ListBoxItem Name="NavListSearch" ManipulationMode="TranslateX" ManipulationCompleted="Pane_ManipulationCompleted">
  82. <StackPanel Style="{StaticResource NavStackPanel}">
  83. <TextBlock Style="{StaticResource NavIcon}" Text="&#xE71E;"/>
  84. <TextBlock Style="{StaticResource NavText}" Text="{Binding Search}"/>
  85. </StackPanel>
  86. </ListBoxItem>
  87. <ListBoxItem Name="NavListSettings" ManipulationMode="TranslateX" ManipulationCompleted="Pane_ManipulationCompleted">
  88. <StackPanel Style="{StaticResource NavStackPanel}">
  89. <TextBlock Style="{StaticResource NavIcon}" Text="&#xE713;"/>
  90. <TextBlock Style="{StaticResource NavText}" Text="{Binding Settings}"/>
  91. </StackPanel>
  92. </ListBoxItem>
  93. </ListBox>
  94. </Viewbox>
  95. <StackPanel RelativePanel.AlignBottomWithPanel="True" RelativePanel.AlignLeftWithPanel="True" RelativePanel.AlignRightWithPanel="True" Background="Transparent" Tapped="GPSRefresh_Tapped">
  96. <StackPanel Style="{StaticResource GPSInfoPanel}">
  97. <TextBlock Margin="5,0,0,0" FontSize="16" FontWeight="Bold" Text="{Binding GPSInfo}"/>
  98. </StackPanel>
  99. <StackPanel Style="{StaticResource GPSInfoPanel}" Tapped="GPSRefresh_Tapped">
  100. <TextBlock Style="{StaticResource GPSInfoIcon}" Text="&#xE81D;"/>
  101. <TextBlock Style="{StaticResource GPSInfoText}" Text="{Binding Status}"/>
  102. </StackPanel>
  103. <StackPanel Style="{StaticResource GPSInfoPanel}">
  104. <TextBlock Style="{StaticResource GPSInfoIcon}" Text="&#xE774;"/>
  105. <TextBlock Style="{StaticResource GPSInfoText}" Text="{Binding Source}"/>
  106. </StackPanel>
  107. <StackPanel Style="{StaticResource GPSInfoPanel}">
  108. <TextBlock Style="{StaticResource GPSInfoIcon}" Text="&#xE707;"/>
  109. <TextBlock Style="{StaticResource GPSInfoText}" Text="{Binding Accuracy}"/>
  110. </StackPanel>
  111. <StackPanel Orientation="Horizontal" Margin="15,5">
  112. <TextBlock Text="Nav City Breda @"/>
  113. <TextBlock Text="{Binding Year}" Margin="5,0,0,0" />
  114. </StackPanel>
  115. </StackPanel>
  116. </RelativePanel>
  117. </SplitView.Pane>
  118. <SplitView.Content>
  119. <Grid>
  120. <Frame Name="Frame"/>
  121. <StackPanel ManipulationMode="TranslateX"
  122. ManipulationCompleted="Content_ManipulationCompleted"
  123. Width="10"
  124. Background="Transparent"
  125. HorizontalAlignment="Left"
  126. VerticalAlignment="Stretch">
  127. </StackPanel>
  128. <StackPanel Name="BackMessage" Background="LightGray" Opacity="0.7" HorizontalAlignment="Stretch" VerticalAlignment="Bottom" Margin="0,0,0,40" Visibility="Collapsed" Height="Auto">
  129. <TextBlock Text="{Binding BackText}" Margin="5" HorizontalAlignment="Center" TextAlignment="Center"/>
  130. </StackPanel>
  131. </Grid>
  132. </SplitView.Content>
  133. </SplitView>
  134. </Grid>
  135. </Page>