Esempio n. 1
0
 /// <summary>
 /// Constructs a viewmodel to a page model.
 /// </summary>
 /// <param name="model"></param>
 public PageViewModel(Page model)
 {
     page = model;
     PageViewModels = new ObservableCollection<PageViewModel>();
     foreach(Page child in model.Pages) {
         PageViewModels.Add(new PageViewModel(child));
     }
     PageViewModels.CollectionChanged += new NotifyCollectionChangedEventHandler(PageViewModels_CollectionChanged);
 }
Esempio n. 2
0
 /// <summary>
 /// Removes a page from the book.
 /// </summary>
 /// <param name="page"></param>
 public void RemovePage(Page page)
 {
     Pages.Remove(page);
 }
Esempio n. 3
0
 /// <summary>
 /// Adds a page to the book.
 /// </summary>
 /// <param name="page"></param>
 public void AddPage(Page page)
 {
     Pages.Add(page);
 }