Exemplo n.º 1
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     base.OnNavigatedTo(e);
     control = e.Parameter as Controller.Control;
 }
Exemplo n.º 2
0
        /// <summary>
        /// When the page start
        /// </summary>
        /// <param name="e"></param>
        protected async override void OnNavigatedTo(NavigationEventArgs e)
        {
            control = (Controller.Control) e.Parameter;
            if(!started)
                showGeneralPopup(control.getError("Initialiseren"));
            control.mainPage = this;
            //Remove the previous pages. This is the main page now.
            Frame.BackStack.Clear();

            //The datacontext is this now. This means that binding is now to this class
            this.DataContext = this;
            if (!positionSet)
            {
                await setPosition();
            }
            updateVisitedLine();

            GeofenceMonitor.Current.GeofenceStateChanged += Current_GeofenceStateChanged;
            control.CurrentRouteChanged += control_CurrentRouteChanged;
        }