public void GenerateButtonClicked(object sender, EventArgs e) { Device.BeginInvokeOnMainThread(async() => { string generatedReport = ReportPage.GeneratePdf(inspection, model); ReportPage page = new ReportPage(generatedReport); await App.Navigation.PushAsync(page); }); }
public void GenerateButtonClicked(object sender, EventArgs e) { //Device.BeginInvokeOnMainThread(() => //{ double height = GenerateButton.Height; grid.Children.Remove(GenerateButton); pleaseWaitLabel.HeightRequest = height; grid.Children.Add(pleaseWaitLabel, 0, 2, rowNumber - 1, rowNumber); indicator.IsRunning = true; grid.Children.Add(indicator, 0, 2, rowNumber, rowNumber + 1); //}); Device.BeginInvokeOnMainThread(async() => { string generatedReport = ReportPage.GeneratePdf(inspection, model); ReportPage page = new ReportPage(generatedReport); await App.Navigation.PushAsync(page); grid.Children.Remove(pleaseWaitLabel); grid.Children.Remove(indicator); grid.Children.Add(GenerateButton, 0, 2, rowNumber - 1, rowNumber); indicator.IsRunning = false; }); }