Lazy Load content page

Hi,

I use the SfTabView to load content page inside.

It works well however these are very complex page with loading to api in my view model ...

What is the best way to lazy load complex pages?

Now I set the content like this:

My mainview hosts the sftabview:

MainView

        public MainView(IPageService pageService)
        {
            _pageService = pageService;
            InitializeComponent();

            _pageService.CreatePage(typeof(DashboardView), null).ContinueWith((result) =>
            {
                dbView = result.Result as DashboardView;
                dboardTab.Content = dbView.Content;
            });
     }

        private async MainPage_Appearing(object sender, System.EventArgs e)
        {
            await Task.Run(async () =>
            {
                (dbView.BindingContext as DashboardViewModel).Init(null);

                profileView = await _pageService.CreatePage(typeof(ProfileView), null) as ProfileView;
                adminView = await _pageService.CreatePage(typeof(AdminView), null) as AdminView;

                Device.BeginInvokeOnMainThread(async () =>
                {
                    profileTab.Content = profileView.Content;
                    adminTab.Content = adminView.Content;
                });
            }).ConfigureAwait(false);
        }

In this approach my UI is very long to load. I would like to lazy load my pages. 

What are the best practices?

Thanks,

5 Replies

RS Ramya Soundar Rajan Syncfusion Team May 22, 2020 10:59 AM UTC

Hi Alexis, 

Greetings from Syncfusion. 

Currently, we do not have the support for Lazy Loading. We have logged the feature request for this.You can track the status of the feature from below link 
 
 
If you have any more specifications/suggestions on this, you can add it as a comment in the portal.    
   
This feature will be available in our upcoming Volume 2 main release which is expected to be rolled out at the end of June 2020.  
  
We suggest a workaround sample to achieve your requirement by assigning content to each tab in the Selection Changed event. Please find the sample from the below link, 
 
Please check with the above sample and let us know if you have any concerns. 
 
Regards, 
Ramya S 



AL Alexis May 22, 2020 11:07 AM UTC

Thanks a lot.

Could you please notify me when it will be available please?


RS Ramya Soundar Rajan Syncfusion Team May 22, 2020 11:37 AM UTC

Hi Alexis, 
  
Thanks for the update. 
  
As we said earlier, the lazy loading feature will be available in our volume 2 main release which is expected to be rolled out at the end of June 2020. We will let you know once the release is rolled out. We appreciate your patience until then. 
  
Regards, 
Ramya S 



SP Sakthivel Palaniyappan Syncfusion Team July 9, 2020 10:54 AM UTC

Hi Alexis,

Sorry for the inconvenience.

We have not included the feature in our Volume 2 , 2020 main release. We are currently working on this, and due to more architectural changes and to cover more working scenarios it is taking more time than expected. We will include the improvement in our upcoming Volume 3, 2020 main release. Which will be expected to be rolled out on end of September 2020. We are deeply sorry for this delay.

Regards,
Sakthivel P.



SP Sakthivel Palaniyappan Syncfusion Team October 6, 2020 12:00 PM UTC

Hi Alexis,

We are glad to announce that our Essential Studio 2020 Volume 3 release v18.3.0.35 is rolled out and we have included the support in Android platform and is available for download under the following link.

https://www.syncfusion.com/forums/158306/essential-studio-2020-volume-3-release-v18-3-0-35-is-available-for-download

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.

Regards,
Sakthivel P.   
 


Loader.
Up arrow icon