I have an array of album and their infos retrieved from a query in a SQLLite Database. Like this
idalbum album_name album_label album_year
1 Nevermind Sony 1996
2 Dark Horse WarnerBros 2008
and I want to visualize just the name in a List Picker. So I binded its ItemsSource to the array, like this
public List<clsAlbums> alb_array;
SQLiteCommand command=conn.CreateCommand("SELECT * FROM album");
alb_array=command.ExecuteQuery<clsAlbums>();
albSelect.ItemsSource = alb_array;
albSelect.DisplayMemberPath = "album_name";
and it correctly shows the name of the album. However, when I click on it to change the name, it goes to FULL SCREEN MODE, and I get this list of elements
newproject.Model.clsAlbums
newproject.Model.clsAlbums
newproject.Model.clsAlbums
newproject.Model.clsAlbums etc.....
and so on (I saved clsAlbums.cs in the Model folder and imported it with using
). Why does it happen? Because if I click one of them, the full screen mode closes and the ListPicker box correctly shows the name of the album, just not in fullscreen.
Aucun commentaire:
Enregistrer un commentaire