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

How do I programmatically select an unloaded project?

$
0
0


Based on  Programmatically Reloading Project/Solution , I'm trying to do something very similar.

The answer there says you have to programmatically select the unloaded project. I have the solution explorer window walking through and selecting items. It is simple looping through the collection.

public IEnumerable<UIHierarchyItem> GetChildItems(UIHierarchyItem parent,bool topdown)
{
	parent.UIHierarchyItems.Expanded=true;
	if(parent.Collection.Count>0) // I think this fails when none of the children are loaded
		foreach(var item in parent.UIHierarchyItems.Cast<UIHierarchyItem>())
		{
			if(topdown)
				yield return item;
			foreach(var ic in GetChildItems(item,topdown))
				yield return ic;
			if(!topdown)
				yield return item;
		}
}

When an item is unloaded, I am not finding a way to find out what it is. I also don't see anyway to select an item directly given its name. How would I do this?


Programmer in Jacksonville, FL


Viewing all articles
Browse latest Browse all 4410

Trending Articles



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