public IsolatedStorageSettings appSettings =
IsolatedStorageSettings.ApplicationSettings;
public Settings()
{
InitializeComponent();
this.toggle.Checked += new EventHandler<RoutedEventArgs>(toggle_Checked);
this.toggle.Unchecked += new EventHandler<RoutedEventArgs>(toggle_Unchecked);
this.toggle.Click += new EventHandler<RoutedEventArgs>(toggle_Click);
this.toggle.Indeterminate += new EventHandler<RoutedEventArgs>(toggle_Indeterminate);
`}`
무효 toggle_Unchecked (개체를 보낸 사람, RoutedEventArgs e)에 기본 호출하여 {격리 된 저장소 값에 액세스 할 위치는 어디입니까?
this.toggle.Content = "Visibity is off";
this.toggle.SwitchForeground = new SolidColorBrush(Colors.Red);
appSettings.Add("value", "off");
}
void toggle_Checked(object sender, RoutedEventArgs e)
{
this.toggle.Content = "Visibity is on";
this.toggle.SwitchForeground = new SolidColorBrush(Colors.Green);
appSettings.Add("value", "on");
}
void toggle_Indeterminate(object sender, RoutedEventArgs e)
{
//add some content here
}
void toggle_Click(object sender, RoutedEventArgs e)
{
//add some content here
}
는 사용자가 버튼을 다시 응용 프로그램에 로그인 사용자가 사용자 때문에 unchcked을 보여줄 필요가 unchcked method.If을 확인 이전에 btn을 unchcked.vut 그것은 격리 된 스토리지에 하나의 값을 저장하고있다. 격리 된 가변 값에 액세스 할 수있는 위치를 알려주십시오.