简体   繁体   中英

Windows Phone how to bind XAML listbox to sqlite database

I am building a chat application for Windows Phone 8.1(Yes!another one).Is there anyway I can bind my database table to the listbox ie if I add a row to the database,one item should be automatically added to the listbox? In my previous app I did something like whenever user tries to save an object,the app saves the object to the database,then manually creates a different object(suitable for listbox) based on the object just saved to the db and adds it to ObservableCollection bound to the listbox. Is there any better approach than this?

无法绑定到Sqlite数据库中的表,您将必须像以前一样将记录添加到ObservableCollection中,然后再向数据库中添加新记录。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM