Can't load page dynamically in thread?

This code can be displayed normally

 protected override void OnAppearing()
        {
             
            base.OnAppearing();
tabview.Items[0].Content = new RecoveryView();

}

The following ones are not allowed.

   protected override void OnAppearing()
        {
             
            base.OnAppearing();

            Task.Run(()=> {

                tabview.Items[0].Content = new RecoveryView();
                MainThread.BeginInvokeOnMainThread(()=> { 
                
                
                });
            
            });

}

1 Reply 1 reply marked as answer

SS Suganya Sethuraman Syncfusion Team March 22, 2021 12:52 PM UTC

Hi xu zhi bin,

Greetings from Syncfusion.

We have validated your query and we have prepared a sample based on the provided information to replicate the reported issue. We regret to let you know that we were not able to replicate the same.  Please have a sample for your reference,

Sample: https://www.syncfusion.com/downloads/support/directtrac/general/ze/Load-PageContent-into-SfTabView-master971344487

Since we were not aware for your exact scenario. Could you please try our sample and let us know if you are still experiencing the same problem? If you are having same issue, please modify our sample and get back to us, or provide a video of the issue or complete runnable sample which would be helpful for us to check on it and provide you the solution as soon as possible.

Regards,
Suganya Sethuraman.
 


Marked as answer
Loader.
Up arrow icon