// If connection fails private void Connection_CreateConnectionFailed(object sender, CreateConnectionAsyncArgs e) { this.Loading(false); MessageBox.Show("Connection failed: " + e.Message); }
// If connection is success private void Connection_CreateConnectionCompleted(object sender, CreateConnectionAsyncArgs e) { Deployment.Current.Dispatcher.BeginInvoke(() => { PlayerStatus = "Connection established to " + Connection.Server; }); this.Loading(true, "Loading playlist"); //Deployment.Current.Dispatcher.BeginInvoke(() => { Playlist.Clear(); }); getAllTracksEvent += MainPage_GetAllTracks; GetPlaylist(); }