2
我想要保存TextBox
中的值,ComboBox
和CheckBox
的SelectedIndex
中的一项文本被检查为true或false。然后我想从一个按钮中调用OnClick
保存的设置。我已经去了TextBox
下面,但我得到以下错误声明:KeyNotFoundException
未被用户代码处理。给定的密钥不在目前的字典中?在Silverlight 5(vb)中使用IsolatedStorage保存用户设置
任何人都可以帮助我吗?
Private Sub Button2_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button2.Click
Dim Store As IsolatedStorageSettings = IsolatedStorageSettings.ApplicationSettings
IsolatedStorageSettings.ApplicationSettings(TextBox1.Text) = TextBox1
End Sub
Private Sub Button3_Click(sender As System.Object, e As System.Windows.RoutedEventArgs) Handles Button3.Click
TextBox1 = (IsolatedStorageSettings.ApplicationSettings(TextBox1.Text))
End Sub
感谢您的帮助凯利我应该能够从你的答案中解决所有问题。非常感激 – user1772044