public SongWindow(SongTextControl textControl, SearchBar searchBar, MusicItemsViewer musicItemViewer) { this.musicItemViewer = musicItemViewer; this.textControl = textControl; this.searchBar = searchBar; this.searchBar.SelectionChanged += ShowSong; this.musicItemViewer.MusicItemClick += ShowSong; }
public MainPage() { this.InitializeComponent(); this.NavigationCacheMode = NavigationCacheMode.Required; FileManager.Songs.ToList(); FileManager.Artists.ToList(); this.NavigationCacheMode = NavigationCacheMode.Required; SearchBar SearchBar = new SearchBar(SearchControl, ResultSearchControl, SongTextControl, ListArtistsControl); MusicItemsViewer musicItemsViewer = new MusicItemsViewer(ListArtistsControl, SongTextControl, SearchBar); SongWindow songWindow = new SongWindow(SongTextControl, SearchBar, musicItemsViewer); searchBarPanel = SearchBar; songWindowPanel = songWindow; musicItemsViewerPanel = musicItemsViewer; HardwareButtons.BackPressed += back_Click; }