protected override void OnNavigatedTo(NavigationEventArgs e) { message = ""; // These must be initialized before the UI loads CharacteristicVM.Initialize(GlobalSettings.SelectedCharacteristic); ServiceVM.Initialize(GlobalSettings.SelectedCharacteristic.ServiceM); DeviceVM.Initialize(GlobalSettings.SelectedCharacteristic.ServiceM.DeviceM); // Read the characteristic value on a separate thread Utilities.RunFuncAsTask(GlobalSettings.SelectedCharacteristic.ReadValueAsync); }
// Set up entry into page protected override void OnNavigatedTo(NavigationEventArgs e) { // Reset list choice if (_characteristicListBox != null) { _characteristicListBox.SelectedIndex = -1; } // These must be initialized before the UI loads DeviceVM.Initialize(GlobalSettings.SelectedService.DeviceM); ServiceVM.Initialize(GlobalSettings.SelectedService); Characteristics.Initialize(ServiceVM.ServiceM.CharacteristicModels); // Read all characteristic values Utilities.RunFuncAsTask(GlobalSettings.SelectedService.ReadCharacteristicsAsync); }