I thought you could use FlyoutBehavior property. There are three values for FlyoutBehavior : Disabled, Flyout and Locked. So we could disable the flyout if we set FlyoutBehavior to Disabled.
When doing the calculation, set the this.FlyoutBehavior = FlyoutBehavior.Disabled and when the calculation is finished, set this.FlyoutBehavior = FlyoutBehavior.Flyout. You could use MessagingCenter to notify.
In the FlyoutPage, create a subscriber to receive message
public AppShell()
{
InitializeComponent();
...
MessagingCenter.Subscribe<CalculationPage, string>(this, "Hi", (sender, args) =>
{
if (args == "Enable")
{
this.FlyoutBehavior = FlyoutBehavior.Flyout;
}
else if (args == "Disable")
{
this.FlyoutBehavior = FlyoutBehavior.Disabled;
}
});
}
And in the calculation page, when you start calculation:
MessagingCenter.Send<CalculationPage,string>(this, "Hi","Disable");
when calculation is finished, set it back:
MessagingCenter.Send<CalculationPage, string>(this, "Hi", "Enable");
For more information about MessagingCenter, you could refer to Publish and subscribe to messages
Hope my answer could help you.