Exemplo n.º 1
0
        // Constructor
        public PanoPage()
        {
            InitializeComponent();

            this.ViewModel   = PanoVM.Instance;
            this.DataContext = this.ViewModel;
            RecentStopsQueue.Refresh();

            CurrentInstance = this;

            // Sample code to localize the ApplicationBar
            //BuildLocalizedApplicationBar();
        }
Exemplo n.º 2
0
        /// <summary>
        /// Finish initialization after setting the viewmodel
        /// </summary>
        private void InitializeFromViewModel()
        {
            this.DataContext = this.ViewModel;

            // Initialize progress bar
            InitializeProgress();

            // Get location if necessary
            if (LocationTracker.Location == null && LocationTracker.GetPermission())
            {
                ProgressIndicatorHelper.Instance.Push(LoadingEnum.Location);
                LocationTracker.RetrieveLocation();
            }

            // Update recent stops
            RecentStopsQueue.Push(ViewModel.Context);

            // Preven further initialization
            this.startup = false;
        }