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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

LoadTemplate should not be null

Thread ID:





145688 Jul 3,2019 03:35 PM UTC Jul 4,2019 10:22 AM UTC Xamarin.Forms 3
Tags: SfRotator
Liam Keogh
Asked On July 3, 2019 03:35 PM UTC

I am getting the error mentioned above when I try to implement a data template selector on the sfRotator control. 

Running on Visual Studio Enterprise 2019
Syncfusion control version


            <DataTemplate x:Key="SampleTemplateTextLine">
                        Columns="{Binding Columns}" />

            <DataTemplate x:Key="SampleTemplateEmptyLine">

            <local:SampleTemplateSelector x:Key="SampleTemplateSelector"
                SampleTemplateTextLine="{StaticResource SampleTemplateTextLine}"
                SampleTemplateEmptyLine="{StaticResource SampleTemplateEmptyLine}" />

                ItemsSource="{Binding SampleList}"
                ItemTemplate="{StaticResource SampleTemplateSelector}">

Muneesh Kumar G [Syncfusion]
Replied On July 4, 2019 06:03 AM UTC

Hi Liam, 
Greetings from Syncfusion.  
We have analyzed your query and we would like to inform you that this problem has been fixed in our latest Vol 2 Beta release ( Please upgrade our version to resolve this problem.  
Before update to Beta version, please follow steps mentioned in below link to clear old nuget cache.   
Muneesh Kumar G.    

Liam Keogh
Replied On July 4, 2019 09:44 AM UTC

Hi Muneesh, unfortunately updating to version 17.2.28-beta introduces a NullReferenceException.

System.NullReferenceException: Object reference not set to an instance of an object.
at Syncfusion.SfRotator.XForms.Droid.SfRotatorRenderer.GetViewTemplateFromTemplate (Xamarin.Forms.DataTemplate template, System.Int32 index, Xamarin.Forms.Rectangle size, Syncfusion.SfRotator.XForms.SfRotator _rotator)

Can you confirm if this has anything to do with my Xamarin.Forms version or not?

Muneesh Kumar G [Syncfusion]
Replied On July 4, 2019 10:22 AM UTC

Hi Liam,  
We have analyzed your code snippet and we found that the reported problem occurs due to using the ViewCell in DataTemplate.  
You can resolve this problem by using TextLine directly without ViewCell in DataTemplate.  
Muneesh Kumar G.  


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