- Home
- Forum
- Xamarin.Forms
- Popup closes immediatly when opened in OnAppearing
Popup closes immediatly when opened in OnAppearing
string sMessage,
string sOkText,
Command okCommand = null,
string sCancelText = null,
Command cancelCommand = null)
{
var msgBox = new SfPopupLayout();
msgBox.PopupView.AcceptButtonText = sOkText;
if(!String.IsNullOrEmpty(sCancelText))
{
msgBox.PopupView.AppearanceMode = AppearanceMode.TwoButton;
msgBox.PopupView.DeclineButtonText = sCancelText;
}
if (okCommand != null)
msgBox.PopupView.AcceptCommand = okCommand;
if (cancelCommand != null)
msgBox.PopupView.DeclineCommand = cancelCommand;
msgBox.PopupView.PopupStyle.CornerRadius = 10;
msgBox.PopupView.ShowHeader = false;
msgBox.PopupView.ShowCloseButton = false;
msgBox.PopupView.AutoSizeMode = AutoSizeMode.Height;
var contentTemplateView = new DataTemplate(() =>
{
var lbl = new Label();
lbl.Margin = new Thickness(5, 10);
lbl.Text = sMessage;
lbl.LineBreakMode = LineBreakMode.WordWrap;
lbl.WidthRequest = 260;
var stack = new StackLayout();
stack.Children.Add(lbl);
return stack;
});
msgBox.PopupView.ContentTemplate = contentTemplateView;
/// Makes the Message modal
msgBox.StaysOpen = true;
msgBox.IsOpen = true;
msgBox.Show(false);
}
Balasubramani Sundaram.
We have logged that bug as internally and included the fix in the version 17.3.0.26. So only the we did not mention the bug in release update. Moreover, we have checked the reported issue in SfPopupLayout version 17.4.0.53 and we could not able to reproduce the issue in our end and it is working fine as expected. Since we are not about your exact application scenario. So could you please reproduce the issue in the below attached sample and revert us back with clear replication procedure.
Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/Popup_Demo96799049-1530933884.zip
Regards,
Karthik Raja
Hi,
I believe we are experiencing a similar problem in our Android app which is using SyncFusion.Forms v20.2.0.40. So I took the sample from your last post, and it too appears to demonstrate a problem even when I upgrade it to the latest Xamarin.Forms v5 and Syncfusion 20.3.0.47 packages.
Although your sample application was showing pop-up boxes, it wasn't obvious to me what it should be doing and when. So in my version I have added debugging statements to the Output window. Please see the attached revised version (Android only). This is what I have changed:
- The navigation button text
- Uses of Debug.Writeline to output to the Output window to indetify the navigation flow, and occurrence of IsAppearing, etc.
- Removed iOS and UWP projects
- Updated Xamarin.Forms 5.0.0.2515 (latest)
- Updated both Syncfusion packages to 20.3.047 (latest)
- Had to comment our the XamlCTask section inXamarin.Formed.targets. I have no idea about this as I have never come across it before, but it would not compile with this present after I had upgrade to Xamarin Forms 5
- Build and run the application (Android Emulator for Pixel 5 is fine)
- Demo page is displayed, (demo page) popup is visible
- Press "Done" to close the pop-up
- Click the button to navigate to main page
- Main page is displayed, (main page) popup is visible
- Press "Done" to close the pop-up
- Press the Navigation back button to return from Main Page to Demo Page
- Demo page is displayed and the (demo page) popup is visible for about a second and then disappears.
Attachment: SfPopup_Demo_bf84a239.zip
Hi
Your response does not make any sense
- What does "logged that bug as inside" mean?
- What is the "astroluna" fix mean, and how do it affect this? Your link took me to a page in Spanish
- Why are you talking about 17.3.0.26 and 17.4.0.53? I told you I updated your sample to use the very latest 20.3.0.47 package, in which I believe there is still a bug
- I already provided a version of your own application that demonstrates the problem, though I believe you could also see this on your own version without my updates
- I already provided you a clear and concise list of instruction to reproduce the problem
- I also explained a bit about my actual application.
Or maybe that reply wasn't meant for me at all since you have responded "Hello jahanzaib,".
Perhaps you have your support threads mixed up?
Paul
Hi Paul,
Regarding issue “SfPopup dismissed when opening from OnAppearing while navigate back”
We would like let you know that we are able to replicate the reported scenario in Xamarin.Forms.Android platform. Currently, we are validating the reported scenario in our source level. We will update you with further details on or before October 7, 2022. We appreciate your patience until then.
Regarding “Or maybe that reply wasn't meant for me at all since you have responded "Hello jahanzaib,".
Perhaps you have your support threads mixed up? “
We would like to inform you that was spam content and we have removed it now.
Regards,
Suja
Hi Peter,
We have logged a bug report for the reported issue “SfPopup gets dismissed immediately when opened from OnAppearing ". We will fix the issue and include the fix in our weekly nuget which is scheduled on November 1, 2022. We will let you know once it is released with the fix. You can also track the status of the report from the below link.
Feedback Link : https://www.syncfusion.com/feedback/38270/sfpopup-gets-dismissed-immediately-when-opened-from-onappearing
Disclaimer: Inclusion of this solution in the weekly release may change due to other factors including but not limited to QA checks and works reprioritization.
Regards,
Suja
Due to the 2022 volume 3 SP release on November 7, 2022, The Weekly NuGet release is not rolling out as we promised. The fix will be available in our upcoming 2022 volume 3 SP release.
We are glad to announce that our Essential Studio 2022 Volume 3 Service Pack Release V20.3.0.56 is rolled out with fix for the issue "SfPopup gets dismissed immediately when opened from OnAppearing” and it is available for download under the following link.
We thank you for your support and appreciate your patience in waiting for this release. Please get in touch with us if you would require any further assistance.
- 12 Replies
- 6 Participants
-
MA Martin
- Aug 29, 2019 09:47 AM UTC
- Nov 9, 2022 02:27 PM UTC