Example #1
0
        private void CreateBookmark(object sender, RoutedEventArgs routedEventArgs)
        {
            flag = true;

            Bookmark mark = new Bookmark();

            mark.NumberPage = flowDocument.MasterPageNumber;

            foreach (var bookmark in currentBook.bookmarks)
            {
                if (bookmark.NumberPage == mark.NumberPage)
                {
                    return;
                }
            }

            currentBook.AddBookmark(mark);

            bookmarkList.DataContext   = null;
            bookmarkList.DataContext   = currentBook.bookmarks;
            bookmarkList.SelectedIndex = -1;


            //bookmarkList.SelectedItem = null;

            flag = false;
        }