Welcome to the .NET MAUI feedback portal. We’re happy you’re here! If you have feedback on how to improve the .NET MAUI, we’d love to hear it!

  • Check out the features or bugs others have reported and vote on your favorites. Feedback will be prioritized based on popularity.
  • If you have feedback that’s not listed yet, submit your own.

Thanks for joining our community and helping improve Syncfusion products!

1
Vote

So i want to use CardView in my .Net Maui application, i set the ItemsSource of the CardLayout using BindableLayout.ItemsSource in xaml like this:


<cards:SfCardLayout BindableLayout.ItemsSource="{Binding Cards}">
<BindableLayout.ItemTemplate>
<DataTemplate>
<cards:CardView>
.
</cards:CardView>
</DataTemplate>
</BindableLayout.ItemTemplate>
</cards:SfCardLayout>


But when i run the application it throws exception on the code behind at line of setting BindingContext of the Page, and complaining about: The specified Cast is not valid

But I'm not casting anything in my code behind (in ViewModel)


When i remove BindableLayout.ItemsSource part from the CardLayout the error is gone, but how am i gonna show my list if i don't set the ItemsSource?


So where is the problem? Is it the CardLayout bug or am i doing something wrong?


Version: 24.1.45