We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

SfBackdropPage Error When Used With Shell

Thread ID:

Created:

Updated:

Platform:

Replies:

151040 Jan 28,2020 09:56 PM UTC Jan 31,2020 12:37 PM UTC Xamarin.Forms 3
loading
Tags: SfBackdropPage
Dean Martin
Asked On January 28, 2020 09:56 PM UTC

I'm trying to use SfBackdropPage with Xamarin Shell.  Please try the Android version of the attached project and select the 'About' tab to reproduce the error which is:

"System.NullReferenceException: 'Object reference not set to an instance of an object.'"

Thank you!

Attachment: App1_d060f43.zip

Divya Venkatesan [Syncfusion]
Replied On January 30, 2020 11:50 AM UTC

Hi Dean, 
  
Greetings from Syncfusion. 
  
We are able to reproduce the reported issue and we will fix this issue internally. However, we suggest you to add the below code snippets in OnAppearing method to resolve this issue at application level. 
  
protected override void OnAppearing() 
{ 
    var navigationStack = Navigation.NavigationStack; 
    if (navigationStack.Count > 0 && navigationStack[navigationStack.Count - 1] != null) 
    { 
        base.OnAppearing(); 
    } 
} 
  
Please let us know if you need any further assistance. 
  
Regards, 
Divya Venkatesan 
 


Dean Martin
Replied On January 30, 2020 09:14 PM UTC

That workaround seems to fix the issue.  I'm not sure if it causes other problems though.  I've tried to put a SfAccordion on the backlayer and that causes error:

Java.Lang.NullPointerException: 'Attempt to read from field 'int android.view.ViewGroup$LayoutParams.width' on a null object reference'

You can duplicate this by selecting the second tab when running the attached sample project on Android.

Thanks,
Dean

Attachment: App1_48c0b053.zip

Lakshmi Natarajan [Syncfusion]
Replied On January 31, 2020 12:37 PM UTC

Hi Dean,  
  
We have checked the reported query from our side. We suspect you are reporting the crash in below bug report,  
  
  
If yes, we would like to inform that above is the framework issue in latest Xamarin Version while loading Label directly inside AccordionItem’s Header/Content and you can follow below bug for further updates from Xamarin team. Meanwhile, we suggest that you can overcome the reported issue in sample by loading Label inside Grid.   
   
Actual Code   
Expected Code   
<Syncfusion:SfAccordion> 
    <Syncfusion:SfAccordion.Items> 
        <Syncfusion:AccordionItem> 
           <Syncfusion:AccordionItem.Header> 
               <Label Text=”Category”/> 
           </Syncfusion:AccordionItem.Header> 
 
           <Syncfusion:AccordionItem.Content> 
               <Label Text=”Hamburger”/> 
           </Syncfusion:AccordionItem.Content> 
        </Syncfusion:AccordionItem> 
     </Syncfusion:SfAccordion.Items> 
<Syncfusion:SfAccordion> 
<Syncfusion:SfAccordion> 
    <Syncfusion:SfAccordion.Items> 
        <Syncfusion:AccordionItem> 
           <Syncfusion:AccordionItem.Header> 
               <Grid>  
                   <Label Text=”Category”/> 
               </Grid> 
           </Syncfusion:AccordionItem.Header> 
 
           <Syncfusion:AccordionItem.Content> 
               <Grid>  
                  <Label Text=”Hamburger”/> 
               </Grid> 
           </Syncfusion:AccordionItem.Content> 
        </Syncfusion:AccordionItem> 
     </Syncfusion:SfAccordion.Items> 
<Syncfusion:SfAccordion> 
   
If no and you are facing any other crash other than above, kindly share more details or revert us back with more detail of exception details in order to analyze and provide better solution at our end.  
  
Regards,  
 Lakshmi Natarajan

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon