3 Answers, 1 is accepted
Hello Yakup,
Thank you for the provided file.
I have created a sample based on it and I reproduced the error Value cannot be null. Usually this error occurs when something in the XAML is incorrect. I have researched the case further and here is what I have found: The content inside the slideview pages is created on-demand. So the SlideView control does not have all pages created. When you try to add 2 contentviews with ListView and bindings, the pages are still not created from the SlideView and the Value cannot be null is thrown.
Solution:
I suggest you add separate contentview files for both ListView controls and add them to the SlideView control, for example:
<telerikPrimitives:RadSlideView x:Name="slideView">
<telerikPrimitives:RadSlideView.ItemsSource>
<x:Array Type="{x:Type ContentView}">
<ContentView>
<local:View1/>
</ContentView>
<ContentView>
<local:View2/>
</ContentView>
</x:Array>
</telerikPrimitives:RadSlideView.ItemsSource>
</telerikPrimitives:RadSlideView>
and the View1.xaml file:
<ContentView.Content>
<ListView ItemsSource="{Binding Items}" x:Name="listView" Margin="30, 0">
<ListView.ItemTemplate>
<DataTemplate>
<ViewCell>
<Grid>
<Label Text="{Binding Title}" FontSize="13" FontAttributes="Italic" TextColor="Gray" Grid.Column="1"/>
</Grid>
</ViewCell>
</DataTemplate>
</ListView.ItemTemplate>
</ListView>
</ContentView.Content>
I hope this will help.
Regards,
Didi
Progress Telerik
Hi Didi,
Thank you for your answer.