|
|
@@ -26,11 +26,19 @@ namespace Breda_Tour.RouteSelectScreen
|
|
|
public sealed partial class RouteSelectPage : Page
|
|
|
{
|
|
|
RouteDatabase AllRoutes;
|
|
|
- ObservableCollection<Route> CurrentRoutes;
|
|
|
+
|
|
|
+ public ObservableCollection<Route> CurrentRoutes
|
|
|
+ {
|
|
|
+ get { return (ObservableCollection<Route>)GetValue(HelpItemProperty); }
|
|
|
+ set { SetValue(HelpItemProperty, value); }
|
|
|
+ }
|
|
|
+ public static readonly DependencyProperty HelpItemProperty =
|
|
|
+ DependencyProperty.Register("CurrentRoutes", typeof(ObservableCollection<Route>), typeof(RouteSelectPage), null);
|
|
|
|
|
|
public RouteSelectPage()
|
|
|
{
|
|
|
AllRoutes = new RouteDatabase();
|
|
|
+ CurrentRoutes = AllRoutes.GetCurrentRoutes();
|
|
|
this.InitializeComponent();
|
|
|
DefaultPivot.SetCheckedButton(CustomControls.DefaultPivotControl.Tab.RouteSelected);
|
|
|
}
|
|
|
@@ -44,7 +52,12 @@ namespace Breda_Tour.RouteSelectScreen
|
|
|
private void Routes_ItemClick(object sender, ItemClickEventArgs e)
|
|
|
{
|
|
|
Route route = e.ClickedItem as Route;
|
|
|
- MainPage.RootFrame.Navigate(typeof (RouteExample), route);
|
|
|
+ MainPage.RootFrame.Navigate(typeof(RouteExample), route);
|
|
|
+ }
|
|
|
+
|
|
|
+ private void Page_GotFocus(object sender, RoutedEventArgs e)
|
|
|
+ {
|
|
|
+ CurrentRoutes = AllRoutes.GetCurrentRoutes();
|
|
|
}
|
|
|
}
|
|
|
}
|