private void OnBookmarkSelectionChanged(object sender, SelectionChangedEventArgs e)
 {
     if (supressEvents)
     {
         return;
     }
     if (listViewBookmarks.SelectedIndex == -1)
     {
         return;
     }
     PGControl.SelectBookmark(listViewBookmarks.SelectedIndex);
 }
        private void OnBookmarkItemPreviewMouseDown(object sender, MouseButtonEventArgs e)
        {
            if (supressEvents || e.ChangedButton != MouseButton.Left)
            {
                return;
            }

            // Allow reselecting the same index
            int index = listViewBookmarks.Items.IndexOf(sender);

            if (index == listViewBookmarks.SelectedIndex)
            {
                PGControl.SelectBookmark(index);
            }
        }