RouteExample.xaml.cs 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. using Breda_Tour.Data;
  2. using System;
  3. using System.Collections.Generic;
  4. using System.Diagnostics;
  5. using System.IO;
  6. using System.Linq;
  7. using System.Runtime.InteropServices.WindowsRuntime;
  8. using Windows.Foundation;
  9. using Windows.Foundation.Collections;
  10. using Windows.UI.Xaml;
  11. using Windows.UI.Xaml.Controls;
  12. using Windows.UI.Xaml.Controls.Primitives;
  13. using Windows.UI.Xaml.Data;
  14. using Windows.UI.Xaml.Input;
  15. using Windows.UI.Xaml.Media;
  16. using Windows.UI.Xaml.Navigation;
  17. // The Blank Page item template is documented at http://go.microsoft.com/fwlink/?LinkId=234238
  18. namespace Breda_Tour.RouteSelectScreen
  19. {
  20. /// <summary>
  21. /// An empty page that can be used on its own or navigated to within a Frame.
  22. /// </summary>
  23. public sealed partial class RouteExample : Page
  24. {
  25. Route route;
  26. public string WaypointsText { get; set; }
  27. public RouteExample()
  28. {
  29. this.InitializeComponent();
  30. }
  31. protected override void OnNavigatedTo(NavigationEventArgs e)
  32. {
  33. route = e.Parameter as Route;
  34. WaypointsText = "Aantal waypoints: " + 0;
  35. if (route.Waypoints.Count != 0){
  36. WaypointsText = "Aantal waypoints: " +route.Waypoints.Count;
  37. }
  38. }
  39. private void Button_Click(object sender, RoutedEventArgs e)
  40. {
  41. Frame frame = Window.Current.Content as Frame;
  42. //frame.Navigate(typeof(MapPage), route);
  43. }
  44. }
  45. }