Esempio n. 1
0
        public override ICollectionCell GetICollectionCell(int section, int row)
        {
            var item = Model.ItemFor(section, row);
            var cell = item as ICollectionCell;

            if (cell != null)
            {
                return(cell);
            }

//			if(item == null)
//				return new StringCell("");
            cell = GetCellFromEvent(item);

            if (cell == null)
            {
                cell = CellRegistrar.GetCollectionCell(item.GetType());
            }

            if (cell == null)
            {
                cell = base.GetICollectionCell(section, row);
            }

            var binding = cell as IBindingCell;

            if (binding != null)
            {
                binding.BindingContext = item;
            }

            return(cell);
        }
Esempio n. 2
0
        static void RegisterCells()
        {
            CellRegistrar.Register <Song, SongCell>();
            CellRegistrar.Register <TempSong, SongCell>();
            CellRegistrar.Register <Artist, ArtistCell>();
            CellRegistrar.Register <Album, AlbumCell>();
            CellRegistrar.Register <TempAlbum, AlbumCell>();
            CellRegistrar.Register <TempArtist, ArtistCell>();
            CellRegistrar.Register <Genre, GenreCell>();
            CellRegistrar.Register <TempGenre, GenreCell>();
            CellRegistrar.Register <Playlist, PlaylistCell>();
            CellRegistrar.Register <PlaylistSong, PlaylistSongCell>();
            CellRegistrar.Register <RadioStation, RadioStationCell>();


            CellRegistrar.Register <OnlineSong, SongCell>();
            CellRegistrar.Register <OnlineAlbum, AlbumCell>();
            CellRegistrar.Register <OnlineArtist, ArtistCell>();
            CellRegistrar.Register <OnlinePlaylist, PlaylistCell>();
            CellRegistrar.Register <OnlinePlaylistEntry, PlaylistSongCell>();
            CellRegistrar.Register <OnlineRadioStation, RadioStationCell> ();
        }
Esempio n. 3
0
 static void RegisterCells()
 {
     CellRegistrar.Register <Song, SongCell> ();
     CellRegistrar.Register <Artist, ArtistCell> ();
 }