Let's say I create a new folder/filter in SolutionExplorer like below. How do I collapse the corresponding folder in Solution Explorer afterwards? I want to do something like this:
var sp = new ServiceProvider((Microsoft.VisualStudio.OLE.Interop.IServiceProvider)m_dte); var window = VsShellUtilities.GetUIHierarchyWindow(sp, new Guid(ToolWindowGuids80.SolutionExplorer)) as IVsUIHierarchyWindow2; window.ExpandItem(pUIH, itemid, EXPANDFLAGS.EXPF_CollapseFolder);
Specifically, I've been going around in circles trying to figure out where to getitemid from. I'm also not 100% sure about pUIH but I think that should be DTE.Solution, correct?