Files
NavCityBreda/NavCityBreda/MainPage.xaml
T
2015-12-17 14:07:28 +01:00

127 lines
6.2 KiB
XML

<Page
x:Class="NavCityBreda.MainPage"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:local="using:NavCityBreda"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
mc:Ignorable="d">
<Page.Resources>
<Style x:Key="NavStackPanel" TargetType="StackPanel">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="VerticalAlignment" Value="Center" />
</Style>
<Style x:Key="NavIcon" TargetType="TextBlock">
<Setter Property="FontFamily" Value="Segoe MDL2 Assets" />
<Setter Property="FontSize" Value="28" />
<Setter Property="Margin" Value="0,5,0,0" />
</Style>
<Style x:Key="NavText" TargetType="TextBlock">
<Setter Property="FontSize" Value="28" />
<Setter Property="Margin" Value="20,0,0,0" />
</Style>
<Style x:Key="GPSInfoPanel" TargetType="StackPanel">
<Setter Property="Orientation" Value="Horizontal" />
<Setter Property="VerticalAlignment" Value="Center" />
<Setter Property="Margin" Value="10,0,10,0" />
</Style>
<Style x:Key="GPSInfoIcon" TargetType="TextBlock">
<Setter Property="FontFamily" Value="Segoe MDL2 Assets" />
<Setter Property="FontSize" Value="20" />
<Setter Property="Margin" Value="5,5,0,0" />
</Style>
<Style x:Key="GPSInfoText" TargetType="TextBlock">
<Setter Property="FontSize" Value="20" />
<Setter Property="Margin" Value="15,0,0,0" />
</Style>
</Page.Resources>
<Grid>
<Grid.RowDefinitions>
<RowDefinition Height="Auto" />
<RowDefinition Height="*" />
</Grid.RowDefinitions>
<RelativePanel Grid.Row="0">
<Button RelativePanel.AlignLeftWithPanel="True" Name="NavButton" Click="NavButton_Click" VerticalAlignment="Stretch" FontFamily="Segoe MDL2 Assets" Content="&#xE700;" FontSize="28" />
<TextBlock RelativePanel.RightOf="NavButton" FontSize="28" Margin="10,0,0,0" Name="PageTitle" x:Uid="PageTitleDefault"/>
</RelativePanel>
<!-- http://stackoverflow.com/questions/32108362/uwp-swipe-to-open-splitview-pane-->
<SplitView Grid.Row="1" Name="NavView" DisplayMode="Overlay" OpenPaneLength="275">
<SplitView.Pane>
<RelativePanel Name="MySplitviewPane" VerticalAlignment="Stretch"
ManipulationMode="TranslateX"
ManipulationCompleted="MySplitviewPane_ManipulationCompleted"
Background="Transparent">
<ListBox RelativePanel.AlignTopWithPanel="True" SelectionMode="Single" Name="NavList" SelectionChanged="NavList_SelectionChanged" Tapped="NavList_Tapped">
<ListBoxItem Name="NavListRoute">
<StackPanel Style="{StaticResource NavStackPanel}">
<TextBlock Style="{StaticResource NavIcon}" Text="&#xE7AD;"/>
<TextBlock Style="{StaticResource NavText}" x:Uid="MenuItemRoute" Text="[MenuItemRoute]"/>
</StackPanel>
</ListBoxItem>
<ListBoxItem Name="NavListHelp">
<StackPanel Style="{StaticResource NavStackPanel}">
<TextBlock Style="{StaticResource NavIcon}" Text="&#xE897;"/>
<TextBlock Style="{StaticResource NavText}" x:Uid="MenuItemHelp"/>
</StackPanel>
</ListBoxItem>
<ListBoxItem Name="NavListSettings">
<StackPanel Style="{StaticResource NavStackPanel}">
<TextBlock Style="{StaticResource NavIcon}" Text="&#xE713;"/>
<TextBlock Style="{StaticResource NavText}" x:Uid="MenuItemSettings"/>
</StackPanel>
</ListBoxItem>
</ListBox>
<StackPanel RelativePanel.AlignBottomWithPanel="True" RelativePanel.AlignLeftWithPanel="True" RelativePanel.AlignRightWithPanel="True" Background="Transparent">
<StackPanel Style="{StaticResource GPSInfoPanel}" Tapped="GPSRefresh_Tapped">
<TextBlock Style="{StaticResource GPSInfoIcon}" Text="&#xE81D;"/>
<TextBlock Style="{StaticResource GPSInfoText}" Text="{Binding Status}"/>
</StackPanel>
<StackPanel Style="{StaticResource GPSInfoPanel}">
<TextBlock Style="{StaticResource GPSInfoIcon}" Text="&#xE774;"/>
<TextBlock Style="{StaticResource GPSInfoText}" Text="{Binding Source}"/>
</StackPanel>
<StackPanel Style="{StaticResource GPSInfoPanel}">
<TextBlock Style="{StaticResource GPSInfoIcon}" Text="&#xE707;"/>
<TextBlock Style="{StaticResource GPSInfoText}" Text="{Binding Accuracy}"/>
</StackPanel>
<StackPanel Orientation="Horizontal" Margin="15,5">
<TextBlock Text="Nav City Breda @"/>
<TextBlock Text="{Binding Year}" Margin="5,0,0,0" />
</StackPanel>
</StackPanel>
</RelativePanel>
</SplitView.Pane>
<SplitView.Content>
<Grid>
<Frame Name="Frame"/>
<StackPanel ManipulationMode="TranslateX"
ManipulationCompleted="Grid_ManipulationCompleted"
Width="10"
Background="Transparent"
HorizontalAlignment="Left"
VerticalAlignment="Stretch">
</StackPanel>
</Grid>
</SplitView.Content>
</SplitView>
</Grid>
</Page>