private void BtnAddBookmark_Click(object sender, RoutedEventArgs e) { HideSearchForm(); var bookmarkEditor = new EditBookmarkWindow(); bookmarkEditor.ShowEditor(null); ShowSearchForm(); DoSearches(true); txtSearch.Focus(); }
private void EditBookmarkCommand_Click(object sender, RoutedEventArgs e) { MenuItem editBookmarkCommand = sender as MenuItem; ContextMenu pillMenu = editBookmarkCommand.Parent as ContextMenu; Pill pillResult = pillMenu.PlacementTarget as Pill; var bookmarkIds = pillResult.GetBookmarkIdFromPill(); HideSearchForm(); var bookmarkEditor = new EditBookmarkWindow(); bookmarkEditor.ShowEditor(bookmarkIds.Item2); ShowSearchForm(); DoSearches(true); txtSearch.Focus(); }