Пример #1
0
 private void MenuItem_Click(object sender, RoutedEventArgs e)
 {
     vm.RemoveFavorite((ViewModel)((MenuItem)sender).DataContext);
     vm.SerializeJson();
 }
Пример #2
0
 private void MenuItem_Click(object sender, RoutedEventArgs e)
 {
     favoVm.AddFavorite((ViewModel)((System.Windows.Controls.MenuItem)sender).DataContext);
     favoVm.SerializeJson();
 }