12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758 |
- using Books_Shop_Kopey.VM;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using System.Windows;
- using System.Windows.Controls;
- using System.Windows.Data;
- using System.Windows.Documents;
- using System.Windows.Input;
- using System.Windows.Media;
- using System.Windows.Media.Imaging;
- using System.Windows.Navigation;
- using System.Windows.Shapes;
- namespace Books_Shop_Kopey.Pages
- {
- /// <summary>
- /// Логика взаимодействия для Books.xaml
- /// </summary>
- public partial class Books : Page
- {
- ViewModel VM;
- public Books(ViewModel vm)
- {
- InitializeComponent();
- VM = vm;
- DataContext = VM;
- }
- private void Page_IsVisibleChanged(object sender, DependencyPropertyChangedEventArgs e)
- {
- if (Visibility == Visibility.Visible)
- {
- ViewModel.Sushnosti.ChangeTracker.Entries().ToList().ForEach(p => p.Reload());
- list.ItemsSource = ViewModel.Sushnosti.Books.ToList();
- }
- }
- private void DobvKorz_Click(object sender, RoutedEventArgs e)
- {
- MessageBox.Show("Не реализованно");
- }
- //private void Dob_Click(object sender, RoutedEventArgs e)
- //{
- // NavigationService.Navigate(new Uri("/Pages/BooksAdd.xaml", UriKind.Relative));
- //}
- }
- }
|