private void OnUnloaded(object sender, RoutedEventArgs e) { player.Close(); playlist.Close(); library.Close(); }