public CommandShortcutsSearchTask(uint dwCookie, IVsSearchQuery pSearchQuery, IVsSearchCallback pSearchCallback, CommandShortcuts parentWindow)
            : base(dwCookie, pSearchQuery, pSearchCallback)
        {
            this.parentWindow = parentWindow;
            var control = (CommandShortcutsControl)parentWindow.Content;

            this.searchControlDataContext = (CommandShortcutsControlDataContext)control.DataContext;
        }
        private void RefreshCommandShortcutsView()
        {
            // Get a handle on the CommandShortcuts Toolwindow
            ThreadHelper.ThrowIfNotOnUIThread();

            CommandShortcuts window = (CommandShortcuts)this.package.FindToolWindow(typeof(CommandShortcuts), 0, true);

            if ((null == window) || (null == window.Frame))
            {
                throw new NotSupportedException("Cannot find CommandShortcuts tool window");
            }

            // Call the Refresh method on the CommandShortcuts Toolwindow
            CommandShortcutsControl            cmdShortcutsControl     = (CommandShortcutsControl)window.Content;
            CommandShortcutsControlDataContext cmdShortcutsDataContext = (CommandShortcutsControlDataContext)cmdShortcutsControl.DataContext;

            cmdShortcutsDataContext.RefreshView();
        }