Hi,
I am creating custom editor for visual studio. In IVsEditorFactory.CreateEditorInstance method I create an instance of MyEditorPane which derives from abstract class Microsoft.VisualStudio.Shell.WindowPane and return it to visual studio. MyEditorPane fills its Content with WPF user control I have created.Now I want to able to know when my editor got focus and when lost focus to perform some custom operations. I have tried to listen to IVsWindowFrameNotify events to handle the OnShow metohds, but I get FrameShow_TabActivated and FrameShow_TabDeActivated only when I switched between tabs. This doesn't works for me in two cases:
1) When I split the visual studio tabs horizontally/vertically to be able to see two files at the same time. In this case I am getting only FrameShow_TabActivated for my pane, but when I click on the tab in the second part of the screen I don't get any notification that my pane lost focus.
2) In addition, when I switch from my pane to other pane like output or errors pane, I am also don't get any notification that my pane is not an active one.
So, what I really want to know is how to listen to WindowPane got and lost focus events to handle all these cases.
I tried to listen to GotFocus and LostFocus events of my WPF user control, but the user control looses the focus each time I am pressing on anything found inside the control itself. so this also didn't helped me.
Thanks,
Marina