-
This is a continuation of a question which I put in the wrong place; however it repeats essentially everything there so there's no need to look at the original. I set out to convert my popups to V2, built a testbed and tried the new versions of several popups out. Got all that working fine, then moved the code to my production program and they simply do not work. Nothing shows up and they hang indefinitely on the await this.ShowPopupAsync(new Label
{
Text = "This must be dismissed manually",
BackgroundColor = Colors.Red,
VerticalOptions = LayoutOptions.End
}, new PopupOptions
{
CanBeDismissedByTappingOutsideOfPopup = true,
Shape = new RoundRectangle
{
CornerRadius = new CornerRadius(20, 20, 20, 20),
StrokeThickness = 2,
Stroke = Colors.LightGray
}
}); Even this shows nothing and waits indefinitely. While it works fine in my testbed, in the production code using the same environment it shows nothing and the I presume the NuGet packages are ok because they work fine in the testbed, although there are a lot more in the production app that are not used in the testbed. I can see Has anyone got any ideas, either of how to fix it, or how to debug it further? Thanks. |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 31 replies
-
I guess that a first step may be to test if the btw: Another thing that comes to mind immediately - are you on the UI thread? |
Beta Was this translation helpful? Give feedback.
-
Nailed it, as expected it was something fairly silly, the offending code was: Shell.Current.Navigating += Cancel_Navigation; Which does exactly what you imagine it might. It's old code meant to prevent the user from navigating away from a splash page (the page has no UI, but using the Android 'back' gesture, for example). The initial attempts to use Popups in my production code were all in the scope of that statement and messing with Shell navigation now affects popups. I'll just come up with an alternative for that code and life's good. Thanks for spending time on this, I appreciate your help. |
Beta Was this translation helpful? Give feedback.
Nailed it, as expected it was something fairly silly, the offending code was:
Which does exactly what you imagine it might. It's old code meant to prevent the user from navigating away from a splash page (the page has no UI, but using the Android 'back' gesture, for example). The initial attempts to use Popups in my production code were all in the scope of that statement and messing with Shell navigation now affects popups. I'll just come up with an alternative for that code and life's good. Thanks for spending time on this, I appreciate your help.