public MainPageViewModel(IProjectNameBuilderService projectNameBuilderService, IToastService toastService) { _projectNameBuilderService = projectNameBuilderService; _toastService = toastService; RefreshCommand = new Command(async() => await RefreshProjectName()); ShowInfoCommand = new Command(async() => await Application.Current.MainPage.DisplayAlert("About", _aboutMessage, "Ok")); CopyNameCommand = new Command(async() => { await Clipboard.SetTextAsync(ProjectName); _toastService.CreateToast("Project name copied!"); }); NavigateToAdvancedCommand = new Command(async() => { var viewModel = settingsPageViewModel ?? new AdvancedSettingsPageViewModel(_toastService); viewModel.History = _history; await Application.Current.MainPage.Navigation.PushAsync(new AdvancedSettingsPage(viewModel)); settingsPageViewModel = viewModel; }); }