void ShowTracksInListView() { lvm = ListViewMode.kTrackList; ReturnPlaylists.Visibility = Visibility.Visible; LabelPlayPlayList.Visibility = Visibility.Visible; RecalculateListView(); //var gridView = new GridView(); //listView.View = gridView; for (int i = 0; i < listTracksFromPL.Count; i++) { Label l = new Label(); l.Foreground = foregroundLabelBrush; l.Content = listTracksFromPL[i].Track.Name; l.FontFamily = new FontFamily("Segoe UI Light"); //gridView.Columns PlayList.SpotPlayListLabel openLabel = new PlayList.SpotPlayListLabel(); openLabel.Content = "Play"; openLabel.MouseUp += OpenLabelClicked; openLabel.playlistId = 0; openLabel.spotifyTrackId = listTracksFromPL[i].Track.Uri; listView.Items.Add(new PlayList.SpotListViewItem { Name = l, Open = openLabel, playListId = i }); } foregroundLabelBrush = new SolidColorBrush(foregroundColor); }
void ShowPlayListsInView() { lvm = ListViewMode.kPlayList; ReturnPlaylists.Visibility = Visibility.Collapsed; LabelPlayPlayList.Visibility = Visibility.Collapsed; RecalculateListView(); //var gridView = new GridView(); //listView.View = gridView; for (int i = 0; i < playListNames.Count; i++) { Label l = new Label(); l.Foreground = new SolidColorBrush(foregroundColor); l.Content = playListNames[i]; l.FontFamily = new FontFamily("Segoe UI Light"); //gridView.Columns PlayList.SpotPlayListLabel openLabel = new PlayList.SpotPlayListLabel(); openLabel.Content = "Open"; openLabel.MouseUp += OpenLabelClicked; openLabel.playlistId = i; listView.Items.Add(new PlayList.SpotListViewItem { Name = l, Open = openLabel, playListId = i }); } //foregroundLabelBrush = ((Label)((PlayList.SpotListViewItem)listView.Items[0]).Name).Foreground; }