private void LLS_SelectionChanged(object sender, SelectionChangedEventArgs e) { // If selected item is null, do nothing if (AsetuksetList.SelectedItem == null) { return; } //MessageBox.Show( e.AddedItems.ToString() ); Lohko tmp = ((LongListSelector)sender).SelectedItem as Lohko; for (int i = 0; i < App.lohkolista.Count(); ++i) { if (App.lohkolista[i].md5 == tmp.md5) { App.lohkolista[i].IsChecked = tmp.IsChecked; App.save(); i = App.lohkolista.Count(); } } // Reset selected item to null AsetuksetList.SelectedItem = null; }
private void LohkoValittu(object sender, SelectionChangedEventArgs e) { Lohko l = ((LongListSelector)sender).SelectedItem as Lohko; App.Lohko_ = l.lohko; NavigationService.Navigate(new Uri("/MainPage.xaml?index=" + App.lastPivot, UriKind.Relative)); }