private async Task SaveData(bool saveViewModelState = false) { try { foreach (var controller in _controllers) { await controller.Save(); } } catch (Exception e) { #if DEBUG SimpleIoc.Default.GetInstance <IMessageBoxService>().ShowAsync(e.ToString(), "Loading"); return; #endif throw; } if (saveViewModelState) { ViewModelManager.SaveState(); } }