I have a data template selector with two data templates and set the key of the datatemplateselector as ItemTemplate on SfCarousel.
Result:
Invalid Operation Exception: LoadTemplate should not be null
Source:
<sfc:SfCarousel x:Name="carousel"
ItemTemplate="{StaticResource mediaDataTemplateSelector}"
ItemsSource="{Binding MediaFiles}"
HorizontalOptions="FillAndExpand" VerticalOptions="FillAndExpand" />
<ResourceDictionary>
<DataTemplate x:Key="mediaImageTemplate">
</DataTemplate>
<DataTemplate x:Key="mediaVideoTemplate">
</DataTemplate>
<local:MediaDataTemplateSelector x:Key="mediaDataTemplateSelector"
ImageTemplate="{StaticResource mediaImageTemplate}"
VideoTemplate="{StaticResource mediaVideoTemplate}" />
</ResourceDictionary>
</ContentPage.Resources>