コード例 #1
0
        protected override void OnNavigatedTo(NavigationEventArgs e)
        {
            // Reset list choice
            if (_serviceListBox != null)
            {
                _serviceListBox.SelectedIndex = -1;
            }

            // These must be initialized before the UI loads
            DeviceVM.Initialize(GlobalSettings.SelectedDevice);
            ServicesVM.Initialize(GlobalSettings.SelectedDevice.ServiceModels);

            // Complete remaining initialization without blocking this callback
            Utilities.RunFuncAsTask(GlobalSettings.SelectedDevice.RegisterNotificationsAsync);
        }