c# - Xamarin CarouselView Not Displayed -


i attempting use carouselview first time , kind of struck it. have xaml defined follows

<?xml version="1.0" encoding="utf-8" ?> <contentpage xmlns="http://xamarin.com/schemas/2014/forms"              xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml"              xmlns:prism="clr-namespace:prism.mvvm;assembly=prism.forms"              prism:viewmodellocator.autowireviewmodel="true"              xmlns:cv="clr-namespace:xamarin.forms;assembly=xamarin.forms.carouselview"              x:class="csixty.xam.views.mainpage"              title="mainpage">     <contentpage.content>     <stacklayout>         <label text="name"  horizontaloptions="center" verticaloptions="centerandexpand"/>         <cv:carouselview itemssource="{binding zoos}">             <cv:carouselview.itemtemplate>                 <datatemplate>                     <label text="{binding name}" />                  </datatemplate>             </cv:carouselview.itemtemplate>         </cv:carouselview>     </stacklayout>     </contentpage.content> </contentpage> 

the viewmodel has collection defined follows.

    public mainpageviewmodel()     {         zoos = new observablecollection<zoo>             {                 new zoo                 {                     name = "woodland park zoo"                 },                     new zoo                 {                     name = "cleveland zoo"                     },                 new zoo                 {                     name = "phoenix zoo"                 }             };      } 

where zoo defined

public class zoo {     public string name { get; set; } } 

my issue carousel doesn't show up. empty. guide me ?

finally got working, thought share in case else runs same situation.

you need install nuget package in droid project (or whatever platform using) well. previously, had installed in portable library only.


Comments

Popular posts from this blog

ubuntu - PHP script to find files of certain extensions in a directory, returns populated array when run in browser, but empty array when run from terminal -

php - How can i create a user dashboard -

javascript - How to detect toggling of the fullscreen-toolbar in jQuery Mobile? -