I have a ToolWindow that displays an object outline.  In the outline is a nested object that has properties.  I have a context menu on this object to show Properties in the Properties grid.

I get there with this code:
private void PropertiesHandler(object sender, EventArgs arguments)
{
 IVsUIShell shell = Microsoft.VisualStudio.Shell.Package.GetGlobalService(typeof(SVsUIShell)) as IVsUIShell;
 Debug.Assert(shell != null, "Could not get the ui shell from the outline");
 if (shell == null)
 {
  throw new InvalidOperationException();
 }
 
 IVsWindowFrame frameProperties;
 Guid guidPropBrowser = new Guid(ToolWindowGuids.PropertyBrowser);
 shell.FindToolWindow((uint)__VSFINDTOOLWIN.FTW_fForceCreate, ref guidPropBrowser, out frameProperties);
 object objFrameSP;
 frameProperties.GetProperty((int)__VSFPROPID.VSFPROPID_SPFrame, out objFrameSP);
 ServiceProvider frameSP = new ServiceProvider((Microsoft.VisualStudio.OLE.Interop.IServiceProvider)objFrameSP);
 ITrackSelection trackSelection = frameSP.GetService(typeof(STrackSelection)) as ITrackSelection;
 Microsoft.VisualStudio.Shell.SelectionContainer selectionContainer = new Microsoft.VisualStudio.Shell.SelectionContainer(false, false); ...
 //  this is a proxy for my object
 PBNvoPropertiesBase nbase = PBNvoPropertiesBase.CreatePropertyProxy(trackSelection, uType);
 selectedObjects.Add(nbase);

 selectionContainer.SelectableObjects = selectedObjects;
 selectionContainer.SelectedObjects = selectedObjects;
 trackSelection.OnSelectChange(selectionContainer);

 if (frameProperties != null)
  frameProperties.Show();
}

ok, this code works just fine - shows the properties of my nested proxy object. 

The problem occurs when anything else is now selected in the IDE, be it a control in Cider or properties from Solution Explorer.  At this point, the new selection will show in
the properties grid, but as soon as you set focus to the properties grid it reverts back to the ToolWindow selection.

It seems to be ToolWindow, but I'm not sure what I'm doing wrong.