Posted 11 years ago by JDEV
Is there a (simple) way to get command targets working across tool and document windows.
VisualStudio style docking / window layouts. My active document window adds a commandbinding to MyCommands.InsertItem.
I have a tool window with a listview. Its items have a context menu item that triggers MyCommands.InsertItem with a parameter.
Problem: Since I have to focus on the tool window to the display context menu, my context menu item is disabled (because the document window is no longer active).
My work around is to bind to the command at the main window level, check for the LastActiveWindow and see if supports InsertItem, then call it directly.
[Modified at 09/05/2008 06:10 AM]