Quantcast
Channel: Xamarin.Forms — Xamarin Community Forums
Viewing all articles
Browse latest Browse all 75885

Problem with WorkingWithListviewNative sample

$
0
0

Good day, I have been using this sample for my listview implementation. It works pretty well and smooth.

see here:
https://github.com/xamarin/xamarin-forms-samples/tree/master/WorkingWithListviewNative/WorkingWithListviewNative

My Question is can i parse a class or List as a cell property?
Here is an example:

`public class NativeCell : ViewCell
{
public NativeCell ()
{
}

    public static readonly BindableProperty testProperty=
        BindableProperty.Create("Test",typeof(List<string>),typeof(NativeCell),"");
    public List<string> test{
        get{ return(List<string>)GetValue (testProperty); }
        set{
            SetValue (testProperty, value);
        }
    }

}`

But When I use this, it occurs an error "The type initializer for 'xxxxx' threw an exception ...". Is it possible to parse a List as a viewcell property instead of string?

Thanks for the help


Viewing all articles
Browse latest Browse all 75885

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>