private void HandleMIDILoadCompleted(object sender, AsyncCompletedEventArgs e)
{
try {
loadingScreen.Visibility = Visibility.Hidden;
} catch (NullReferenceException ex) { }
channelSelector.Refresh(ref midiInfo, i_Channel);
// if the serial port is not closed, opening once again (SerialPortSelector opens ports for testing)
// will cause an exception
serialPort.Close();
serialPortSelector.Refresh(s_SelectedSerialPort);
Instruments.Header = "INSTRUMENTS";
//muteSelectedChannel.Width = Double.NaN;
//muteSelectedChannel.Header = "MUTE";
Instruments.Width = Double.NaN;
listViewGrid.Visibility = Visibility.Visible;
midiPlayer.EnterPreviewMode(HandleMIDIPreviewPlayingCompleted);
}