trying to show the sfPopup from OnAppearing()

Hi, i'm trying to open my popup from the OnAppearing() method in my ContentPage and is not showing it.

 protected override async void OnAppearing()

 {

     base.OnAppearing();


     SfPopup popup = new();

     popup.Show();

 }

Before that popup i had a popup in the xaml part of the page and i tried to show it from OnAppearing and that didnt work. 


11 Replies

DV Diwakar Venkatesan Syncfusion Team August 31, 2023 01:08 PM UTC

Hi Jose,


We have analyzed your query, but unfortunately, we are unable to replicate the issue on our end. Could you please confirm whether you are navigating to another page where you are trying to display the popup, or the mentioned issue reproduces during the initial application loading itself? Additionally, could you please share the version of SfPopup that you were using and running platform (device and OS)?

Regards,

Diwakar V



JO Jose replied to Diwakar Venkatesan August 31, 2023 03:36 PM UTC

Hi  Diwakar, 

The platform is Android 9 and the Device is "Chainway C66" it is like a xiaomi device and I`m using net maui controls 22.1.34 .

I am trying to show the popup in the loading event of the initialPage, i cant see the "issue" because it doesnt appear. I`m sharing you some screenshots. I`m not sure if this is the best form to use popups or controls in general because i`m new in net MAUI.

Image_8633_1693496029139

Image_6927_1693496093671



DV Diwakar Venkatesan Syncfusion Team September 1, 2023 12:59 PM UTC

Jose, 

We have analyzed your query along with the attached code snippet you provided. We noticed that you've set the IsOpen property to 'true' and also used 'SfPopup.Show()' in the 'OnAppearing' method. We recommend using either one of these approaches. Additionally, please make sure you are using the latest version of SfPopup (v22.2.11).



JO Jose replied to Diwakar Venkatesan September 1, 2023 03:25 PM UTC

I created a new MAUI proyect and i only add a sfPopup with IsOpen = false and from the code behind on the method onAppearing i add "popup.show()" and still not working. Here i send you .zip with the new example project to test it.  


Attachment: test_sfPopup_24c4a312.zip


DV Diwakar Venkatesan Syncfusion Team September 4, 2023 02:01 PM UTC

Jose, 

We were able to reproduce the reported issue when using a ShellPage. We will validate the issue and provide further details on or before September 6, 2023. We appreciate your patience until then.

In the meantime, we suggest using a NavigationPage or MainPage instead of a ShellPage in App.xaml.cs. Please refer to the code snippet below

MainPage = new NavigationPage(new MainPage());




JO Jose replied to Diwakar Venkatesan September 4, 2023 05:33 PM UTC

Diwakar, I will be waiting for more details, my mainPage is a new AppShell because i am using a tabBar to navigate in my main project then if i use  MainPage = new NavigationPage(new MainPage()); i cant use the tabBar but its ok for now. Thanks for your time. 




JO Jose September 4, 2023 05:33 PM UTC

I recently tried changing my  MainPage = new AppShell(); to  MainPage = new NavigationPage(new MainPage()); and the popup works fine, then i rechange  MainPage = new NavigationPage(new MainPage()); to  MainPage = new AppShell(); and the popup still works fine basically the issue is "fixed"?



DV Diwakar Venkatesan Syncfusion Team September 5, 2023 02:13 PM UTC

Jose, 

We are currently in the process of validating the issue, and it appears that it may still persist. This could be due to a cache-related problem. We recommend clearing the NuGet cache and try to reproduce the issue. Please follow the below link to clear nuget cache

Link - https://support.syncfusion.com/kb/article/6265/how-to-clear-nuget-cache



DV Diwakar Venkatesan Syncfusion Team September 6, 2023 02:28 PM UTC

Jose, 

We have validated your query and would like to inform you that we consider this use case and internally logged the reported issue. The fix will be included in our upcoming weekly NuGet release, which is scheduled for September 19, 2023. We will notify you as soon as the release with the fix becomes available.

We appreciate your patience until then.



DV Diwakar Venkatesan Syncfusion Team September 20, 2023 04:24 AM UTC

Jose

We apologize for the inconvenience caused. Since there is no NuGet release scheduled for this week, the fix will be included in our upcoming weekly NuGet release, which is scheduled for September 26, 2023. We will notify you as soon as the release with the fix becomes available.

We appreciate your patience until then.



AK Ananthalakshmi Kannan Syncfusion Team September 26, 2023 11:36 AM UTC

Hi Jose,


We have fixed the reported issue “SfPopup does not open when using OnAppearing in shell page” and included the issue fix in our latest NuGet release update version 23.1.38 which is available for download (https://www.nuget.org/). 


We thank you for your support and appreciate your patience in waiting for this update. Please get in touch with us if you require any further assistance.


Thanks and Regards,

AnanthaLakshmi K.


Loader.
Up arrow icon