private async void NavigationHelper_LoadState(object sender, LoadStateEventArgs e) { ResolvePageHeader(e.NavigationParameter.ToString()); this.proximityViewModel = ProximityViewModel.GetInstance(); InitialControls(); if (await proximityViewModel.TryRetrieveServices()) ChangeScanToStopButton(); this.DataContext = proximityViewModel; }
private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e) { // register event for the appbar and flyout ResolveHeader(e.NavigationParameter.ToString()); //Register controls used in this page RegisterControls(); //Register framwork elements used in this page deviceFirmwareUpdateViewModel = new DeviceFirmwareUpdateViewModel(); this.DataContext = deviceFirmwareUpdateViewModel; RegisterFramworkElements(); }
private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e) { // register event for the appbar and flyout ResolveHeader(e.NavigationParameter.ToString()); //Register controls used in this page RegisterControls(); //Register framwork elements used in this page nordicUARTViewModel = NordicUARTViewModel.GetNordicUartViewModel(); RegisterFramworkElements(); dispatcher = CoreWindow.GetForCurrentThread().Dispatcher; this.DataContext = nordicUARTViewModel; var lastDialog = nordicUARTViewModel.Dialog.Last(); DialogUpdate(lastDialog); nordicUARTViewModel.InvalidateDialog += nordicUARTViewModel_InvalidateDialog; if(nordicUARTViewModel.chosenDevice != null && nordicUARTViewModel.chosenDevice.ConnectionStatus == BluetoothConnectionStatus.Connected && nordicUARTViewModel.uartService.IsServiceStarted) { StartUartModelUI(); } }
/// <summary> /// Populates the page with content passed during navigation. Any saved state is also /// provided when recreating a page from a prior session. /// </summary> /// <param name="sender"> /// The source of the event; typically <see cref="NavigationHelper"/> /// </param> /// <param name="e">Event receivedBytes that provides both the navigation parameter passed to /// <see cref="Frame.Navigate(Type, Object)"/> when this page was initially requested and /// a dictionary of state preserved by this page during an earlier /// session. The state will be null the first time a page is visited.</param> private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e) { ResolvePageHeader(e.NavigationParameter.ToString()); this.heartRateMonitorViewModel = new HeartRateMonitorViewModel(); this.DataContext = heartRateMonitorViewModel; InitialControls(); }
private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e) { SuspensionManager.RegisterFrame(RootFrame, "RootFrame"); RegisterDeviceSelectionControl(); RegisterProfileView(); toolboxMainPageViewModel = new ToolboxMainPageViewModel(); var br = StatusBar.GetForCurrentView(); br.ForegroundColor = Color.FromArgb(1, 0, 156, 222); }
private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e) { ResolvePageHeader(e.NavigationParameter.ToString()); InitialControls(); }
private void NavigationHelper_LoadState(object sender, LoadStateEventArgs e) { this.DataContext = SettingPivotViewModel.GetInstance().SettingPageViewModelDictionary; ResolvePageHeader(e.NavigationParameter.ToString()); }