【发布时间】:2015-08-31 19:07:19
【问题描述】:
我目前正在将我的 Silverlight 项目更新/升级到新的运行时/通用应用程序。
有人可以帮我隔离存储到本地应用数据吗? 我查看了 msdn 和其他资源,但找不到足够明确的答案。
如何将文本框中的文本/数据保存到本地应用程序数据中? 这是隔离存储代码的一部分:
Imports System.IO.IsolatedStorage
Dim highscoreISO As IsolatedStorageSettings = IsolatedStorageSettings.ApplicationSettings
highscoreISO.Add("Highscore", ScoreLabel.Text)
Private Sub MainPage_Loaded(sender As Object, e As RoutedEventArgs) Handles Me.Loaded
If highscoreISO.Contains("Highscore") Then
HighScoreLabel.Text = "Highest Score: " & highscoreISO("Highscore").ToString
ScoreLabel.Text = highscoreISO("Highscore").ToString
Else
HighScoreLabel.Text = "Highest Score: 0"
End If
End Sub
【问题讨论】:
标签: vb.net silverlight windows-phone-8.1 win-universal-app