async void HandleWelcomeViewDisappearing(object sender, EventArgs e) { await _welcomeView.HideView(); await Device.InvokeOnMainThreadAsync(() => { if (_mainLayout.Children.Contains(_welcomeView)) { _mainLayout.Children.Remove(_welcomeView); } }); }
async void HandleWelcomeViewDisappearing(object sender, EventArgs e) { if (_welcomeView is null || _mainLayout is null) { return; } await _welcomeView.HideView(); Device.BeginInvokeOnMainThread(() => { if (_mainLayout.Children.Contains(_welcomeView)) { _mainLayout.Children.Remove(_welcomeView); } }); }
void HandleWelcomeViewDisappearing(object sender, EventArgs e) => _welcomeView?.HideView();