Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

VSPackage - How to find a "filter" in IVsUIHierarchyWindow2 after creating it with VCProject.AddFilter?

$
0
0

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?

Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>