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