문제

I have searched around a lot but have not found much of anything in regards to local storage for Windows 8 metro apps. Does anyone know of any easy way to create a local storage DB with basic save() and load() functions?
All I need is to bind some XAML to some data (titles, descriptions etc). I have made windows phone 7 apps before using Isolatedstoragesystem but obviously it is different for windows 8... documentation didn't help much either >.< Any tips appreciated.

도움이 되었습니까?

해결책

You have a spectrum of options available to you, and there are code samples you should check out - specifically the Application Data Sample at the Windows Dev Center

You could use app file storage, local data (dictionary stored on device), roaming data (dictionary stored in the cloud) - all of which are accessible via Windows.Storage.ApplicationData.Current. For example,

Windows.Storage.ApplicationData.Current.LocalSettings.Values["FirstName"] = "Joe"

Beyond that you could pull in SQLite for relational type storage managed in-process.

다른 팁

Lex.Db seems to be pretty nice on a cursory inspection. I just tested it in a win rt project. It is available on nuget. https://github.com/demigor/lex.db

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top