Пример #1
0
        private void OnAlbumTileClicked(AlbumTile sender, TiledItemContent content)
        {
            Console.WriteLine("clicked {0}", content.DisplayName);
            var album = content.Tag as ContentList.Album;

            ShowAlbum(album);
        }
Пример #2
0
        private void UpdateContentList()
        {
            AlbumTile.UpdateTileSize(mTileSize);

            mTilePanel.Clear();

            mTilePanel.UpdateTileSize(mTileSize);
            for (int i = 0; i < mContentList.AlbumCount; ++i)
            {
                var album    = mContentList.AlbumNth(i);
                var tic      = new TiledItemContent(album.Name, album.AudioFileNth(0).AlbumCoverArt, album);
                var tileItem = new AlbumTile(tic, OnAlbumTileClicked, mAppExitToken.Token);

                mTilePanel.AddVirtualChild(tileItem);
                mTileItems.Add(tileItem);
            }
            mTilePanel.UpdateChildPosition();
        }
Пример #3
0
 public AlbumTile(TiledItemContent content, AlbumTileClicked clickedListener, CancellationToken appExitToken)
 {
     mContent          = content;
     mAlbumTileClicked = clickedListener;
     mAppExitToken     = appExitToken;
 }