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. Image for the cookie policy date

HeaderView causes NullReferenceException

Hi there, 

Have been trying out the SfCalendar for my app. The standard control seems to work fine but when I try to change the HeaderView I get a NullReferenceException. Using version 16.4.0.47. My code is:

         
       
           
       
   

Have attached the stack traces on iOS and Android respectively.

Many thanks

Will

Attachment: Stack_Traces_bcc63718.zip

3 Replies

WI William January 16, 2019 02:59 PM UTC

    <sf:SfCalendar x:Name="Bob">
        <sf:SfCalendar.HeaderView>
            <Label Text="Bob"/>
        </sf:SfCalendar.HeaderView>
    </sf:SfCalendar>


WI William January 16, 2019 05:30 PM UTC

I get the same NullReferenceException when I try to customize the CellTemplate, and with other controls when I customize appearance.

What I have discovered is that using stable Xamarin.Forms 3.4.0.1009999 there is no issue but with 4.0.0.62955-pre2 I get the Exceptions. Seems there is a breaking change coming to many Syncfusion components.


AS Arun siva Syncfusion Team January 17, 2019 01:14 PM UTC

Hi William, 
 
Thanks for contacting Syncfusion support, 
 
We have analyzed the reported issue “NullReferenceException throws when sets header view for calendar with Xamarin forms version 4.0.0.62955 pre-2” and as this version of Xamarin Forms is a prerelease version, hence it may has some bugs in this case the Platform property of VisualElement return as null, while get the property using Reflection, hence kindly use the latest stable version (3.4.0.1009999) of Xamarin Forms, in which it works fine without the exception. 
Kindly revert us if you have any concern. 
 
Regards, 
Arun Siva R

Loader.
Up arrow icon