/// <summary> /// Returns first immediate child node (non-recursive) of a given type. /// </summary> private static void RefreshStartupFile(HierarchyNode parent, string oldFile, string newFile) { for (HierarchyNode n = parent.FirstChild; n != null; n = n.NextSibling) { if (NativeMethods.IsSamePath(oldFile, n.Url) || NativeMethods.IsSamePath(newFile, n.Url)) { n.ReDraw(UIHierarchyElement.Icon); } RefreshStartupFile(n, oldFile, newFile); } }