private void TrackCurrentPage(object state) { if (!_currentPageID.Equals(OneNoteApp.CurrentPageID)) { // pull in new page _currentPageID = OneNoteApp.CurrentPageID; XDocument result = OneNoteApp.GetHierarchy(_currentPageID, HierarchyScope.hsSelf); XNamespace one = result.Root.GetNamespaceOfPrefix("one"); XElement pg = result.Descendants(one.GetName("Page")).FirstOrDefault(); if (pg != null) { _currentPage = new TaggedPage(pg); fireNotifyPropertyChanged(Dispatcher, PAGE_TITLE); fireNotifyPropertyChanged(Dispatcher, RELATED_PAGES); } // build the list of pages } }
internal void NavigateTo(string pageID) { OneNoteApp.NavigateTo(pageID); }