Răsfoiți Sursa

Added help button

Jannick van Ballegooijen 10 ani în urmă
părinte
comite
aa68e3e533

+ 1 - 0
Breda-Tour/App.xaml

@@ -29,6 +29,7 @@
             <x:String x:Key="SymbolClose"></x:String>
             <x:String x:Key="SymbolFolder"></x:String>
             <x:String x:Key="SymbolSettings"></x:String>
+            <x:String x:Key="SymbolHelp"></x:String>
             <x:String x:Key="SymbolGlobe"></x:String>
             <x:String x:Key="SymbolRouteSelect"></x:String>
             <x:String x:Key="SymbolStartRoute"></x:String>

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

@@ -133,6 +133,9 @@
     <Compile Include="HelpScreen\HelpPage.xaml.cs">
       <DependentUpon>HelpPage.xaml</DependentUpon>
     </Compile>
+    <Compile Include="HelpScreen\HelpScreenPage.xaml.cs">
+      <DependentUpon>HelpScreenPage.xaml</DependentUpon>
+    </Compile>
     <Compile Include="MainPage.xaml.cs">
       <DependentUpon>MainPage.xaml</DependentUpon>
     </Compile>
@@ -182,6 +185,10 @@
       <SubType>Designer</SubType>
       <Generator>MSBuild:Compile</Generator>
     </Page>
+    <Page Include="HelpScreen\HelpScreenPage.xaml">
+      <SubType>Designer</SubType>
+      <Generator>MSBuild:Compile</Generator>
+    </Page>
     <Page Include="MainPage.xaml">
       <Generator>MSBuild:Compile</Generator>
       <SubType>Designer</SubType>

+ 9 - 0
Breda-Tour/CustomControls/DefaultPivotControl.xaml

@@ -11,6 +11,7 @@
             <ColumnDefinition Width="*"/>
             <ColumnDefinition Width="*"/>
             <ColumnDefinition Width="*"/>
+            <ColumnDefinition Width="*"/>
         </Grid.ColumnDefinitions>
         <RadioButton 
             x:Name="RouteSelectRadioButton"
@@ -36,6 +37,14 @@
             Grid.Column="2"
             Checked="SettingsRadioButton_Checked"
             Height="50"/>
+        <RadioButton 
+            HorizontalAlignment="Stretch"
+            x:Name="HelpRadioButton"
+            Style="{StaticResource MainNavigationButtonStyle}"
+            Content="{StaticResource SymbolHelp}"
+            Grid.Column="3"
+            Checked="HelpRadioButton_Checked"
+            Height="50"/>
     </Grid>
     
 </UserControl>

+ 10 - 1
Breda-Tour/CustomControls/DefaultPivotControl.xaml.cs

@@ -28,7 +28,8 @@ namespace Breda_Tour.CustomControls
         {
             RouteSelected,
             Map,
-            Settings
+            Settings,
+            Help
         }
 
         public void SetCheckedButton(Tab selected)
@@ -44,6 +45,9 @@ namespace Breda_Tour.CustomControls
                 case Tab.Settings:
                     SettingsRadioButton.IsChecked = true;
                     break;
+                case Tab.Help:
+                    HelpRadioButton.IsChecked = true;
+                    break;
             }
         }
 
@@ -66,5 +70,10 @@ namespace Breda_Tour.CustomControls
         {
             MainPage.RootFrame.Navigate(typeof(Breda_Tours.SettingsScreen.SettingsPage));
         }
+
+        private void HelpRadioButton_Checked(object sender, RoutedEventArgs e)
+        {
+            MainPage.RootFrame.Navigate(typeof(HelpScreen.HelpScreenPage));
+        }
     }
 }

+ 23 - 0
Breda-Tour/HelpScreen/HelpScreenPage.xaml

@@ -0,0 +1,23 @@
+<Page
+    x:Class="Breda_Tour.HelpScreen.HelpScreenPage"
+    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
+    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+    xmlns:local="using:Breda_Tour.HelpScreen"
+    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="*" ScrollViewer.VerticalScrollMode="Enabled"/>
+        </Grid.RowDefinitions>
+        <c:DefaultTopBar Header="Instellingen" x:Uid="AppSettingstxtSettings"/>
+        <c:DefaultPivotControl x:Name="DefaultPivot" Grid.Row="1"/>
+        <StackPanel Grid.Row="2" Background="White">
+            
+        </StackPanel>
+    </Grid>
+</Page>

+ 32 - 0
Breda-Tour/HelpScreen/HelpScreenPage.xaml.cs

@@ -0,0 +1,32 @@
+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.HelpScreen
+{
+    /// <summary>
+    /// An empty page that can be used on its own or navigated to within a Frame.
+    /// </summary>
+    public sealed partial class HelpScreenPage : Page
+    {
+        public HelpScreenPage()
+        {
+            this.InitializeComponent();
+            DefaultPivot.SetCheckedButton(Breda_Tour.CustomControls.DefaultPivotControl.Tab.Help);
+
+        }
+    }
+}