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 My code is:


Have attached the stack traces on iOS and Android respectively.

Many thanks


Attachment: Stack_Traces_bcc63718.zip

3 Replies

WI William January 16, 2019 02:59 PM UTC

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

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 there is no issue but with 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 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 ( of Xamarin Forms, in which it works fine without the exception. 
Kindly revert us if you have any concern. 
Arun Siva R

Live Chat Icon For mobile
Up arrow icon