ソースを参照

Setup Route Select Page

Jannick van Ballegooijen 10 年 前
コミット
443bde2544

+ 7 - 0
Breda-Tour/Breda-Tour.csproj

@@ -113,6 +113,9 @@
       <DependentUpon>MainPage.xaml</DependentUpon>
     </Compile>
     <Compile Include="Properties\AssemblyInfo.cs" />
+    <Compile Include="RouteSelectScreen\RouteSelectPage.xaml.cs">
+      <DependentUpon>RouteSelectPage.xaml</DependentUpon>
+    </Compile>
     <Compile Include="SettingsScreen\SettingsPage.xaml.cs">
       <DependentUpon>SettingsPage.xaml</DependentUpon>
     </Compile>
@@ -158,6 +161,10 @@
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>
     </Page>
+    <Page Include="RouteSelectScreen\RouteSelectPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="SettingsScreen\SettingsPage.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>

+ 3 - 3
Breda-Tour/CustomControls/DefaultPivotControl.xaml

@@ -13,7 +13,7 @@
             <ColumnDefinition Width="*"/>
         </Grid.ColumnDefinitions>
         <RadioButton 
-            Name="RouteSelectRadioButton"
+            x:Name="RouteSelectRadioButton"
             HorizontalAlignment="Stretch"
             Style="{StaticResource MainNavigationButtonStyle}"
             Content="{StaticResource SymbolRouteSelect}"
@@ -22,7 +22,7 @@
             />
         <RadioButton 
              HorizontalAlignment="Stretch"
-            Name="MapRadioButton"
+            x:Name="MapRadioButton"
             Style="{StaticResource MainNavigationButtonStyle}"
             Content="{StaticResource SymbolGlobe}" 
             Grid.Column="1"
@@ -30,7 +30,7 @@
             Height="50"/>
         <RadioButton 
             HorizontalAlignment="Stretch"
-            Name="SettingsRadioButton"
+            x:Name="SettingsRadioButton"
             Style="{StaticResource MainNavigationButtonStyle}"
             Content="{StaticResource SymbolSettings}"
             Grid.Column="2"

+ 2 - 2
Breda-Tour/CustomControls/DefaultPivotControl.xaml.cs

@@ -54,7 +54,7 @@ namespace Breda_Tour.CustomControls
 
         private void RouteSelectRadioButton_Checked(object sender, RoutedEventArgs e)
         {
-
+            MainPage.RootFrame.Navigate(typeof(RouteSelectScreen.RouteSelectPage));
         }
 
         private void MapRadioButton_Checked(object sender, RoutedEventArgs e)
@@ -64,7 +64,7 @@ namespace Breda_Tour.CustomControls
 
         private void SettingsRadioButton_Checked(object sender, RoutedEventArgs e)
         {
-
+            MainPage.RootFrame.Navigate(typeof(Breda_Tours.SettingsScreen.SettingsPage));
         }
     }
 }

+ 1 - 1
Breda-Tour/CustomControls/DefaultTopBar.xaml

@@ -14,7 +14,7 @@
                     FontWeight="Bold"
                     FontSize="18"
                     RelativePanel.AlignVerticalCenterWithPanel="True"
-                   Text="{Binding MySymbol}"
+                    Text="{Binding MySymbol}"
                     Margin="10,0,0,0"
                    >
         </TextBlock>

+ 21 - 0
Breda-Tour/RouteSelectScreen/RouteSelectPage.xaml

@@ -0,0 +1,21 @@
+<Page
+    x:Class="Breda_Tour.RouteSelectScreen.RouteSelectPage"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:local="using:Breda_Tour.RouteSelectScreen"
+    xmlns:c="using:Breda_Tour.CustomControls"
+    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+    mc:Ignorable="d">
+
+    <Grid>
+        <Grid.RowDefinitions>
+            <RowDefinition Height="40"/>
+            <RowDefinition Height="50" />
+            <RowDefinition Height="*"/>
+        </Grid.RowDefinitions>
+        <c:DefaultTopBar Header="Route Selecteren"/>
+        <c:DefaultPivotControl x:Name="DefaultPivot" Grid.Row="1"/>
+        
+    </Grid>
+</Page>

+ 31 - 0
Breda-Tour/RouteSelectScreen/RouteSelectPage.xaml.cs

@@ -0,0 +1,31 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.InteropServices.WindowsRuntime;
+using Windows.Foundation;
+using Windows.Foundation.Collections;
+using Windows.UI.Xaml;
+using Windows.UI.Xaml.Controls;
+using Windows.UI.Xaml.Controls.Primitives;
+using Windows.UI.Xaml.Data;
+using Windows.UI.Xaml.Input;
+using Windows.UI.Xaml.Media;
+using Windows.UI.Xaml.Navigation;
+
+// The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
+
+namespace Breda_Tour.RouteSelectScreen
+{
+    /// <summary>
+    /// An empty page that can be used on its own or navigated to within a Frame.
+    /// </summary>
+    public sealed partial class RouteSelectPage : Page
+    {
+        public RouteSelectPage()
+        {
+            this.InitializeComponent();
+            DefaultPivot.SetCheckedButton(CustomControls.DefaultPivotControl.Tab.RouteSelected);
+        }
+    }
+}

+ 0 - 1
Breda-Tour/SettingsScreen/SettingsPage.xaml.cs

@@ -41,7 +41,6 @@ namespace Breda_Tours.SettingsScreen
             this.InitializeComponent();
 
             DefaultPivot.SetCheckedButton(Breda_Tour.CustomControls.DefaultPivotControl.Tab.Settings);
-
             HelpItems = new ObservableCollection<HelpItem>();
             for (int i = 0; i < 10; i++)
                 HelpItems.Add(new HelpItem

+ 1 - 1
Breda-Tour/project.lock.json

@@ -11467,7 +11467,7 @@
       ]
     },
     "Microsoft.ApplicationInsights.WindowsApps/1.0.0": {
-      "sha512": "NvBQnFeiFd0O1QdBz06UGApD7zn7ztVi7qO18IsM3EjiXRNgfrEBXB+azNm8XqLY8xGFAqh3HAuSd/wHZMe0XA==",
+      "sha512": "fNCAjIwvbTV+G0dT14bgM5tptsqeSaKQaCrlq7QknOq1Xdm8ZmgsDYddMgXkvykyKLjWyU6fKuOpj6fsQJy+wQ==",
       "type": "Package",
       "files": [
         "[Content_Types].xml",