Skip to content

Commit eb013ca

Browse files
Updated Custom-Bookmark.md file
1 parent a178678 commit eb013ca

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

MAUI/PDF-Viewer/Custom-Bookmark.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ private void PdfViewer_DocumentLoaded(object? sender, EventArgs? e)
9393
// Event handler for changes in the bookmarks collection
9494
private void Bookmarks_CollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
9595
{
96-
Check if the change action is 'Add'
96+
// Check if the change action is 'Add'
9797
if (e.Action == NotifyCollectionChangedAction.Add && e.NewItems != null)
9898
{
9999
// Iterate through newly added bookmarks
@@ -243,9 +243,10 @@ To track when a custom bookmark is removed, handle the [CollectionChanged](https
243243
// Event handler for changes in the bookmarks collection
244244
private void Bookmarks_CollectionChanged(object? sender, NotifyCollectionChangedEventArgs e)
245245
{
246-
// Handle removal of new bookmarks
246+
// Check if the change action is 'Remove'
247247
else if (e.Action == NotifyCollectionChangedAction.Remove && e.OldItems != null)
248248
{
249+
// Iterate through reomoved bookmarks
249250
foreach (Bookmark bookmark in e.OldItems)
250251
{
251252
Debug.WriteLine($"Removed bookmark: {bookmark.Name} at page {bookmark.PageNumber}");

0 commit comments

Comments
 (0)