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); }
public MainWindow() { InitializeComponent(); DataContext = new DeviceVm(new Device("TFS")); }