private static CustomShortcut FindNodeType( string typeName, ShortcutCollection nodes) { foreach (CustomShortcut cs in nodes) { if (cs.OwnerType.ToString() == typeName) return cs; return FindNodeType(typeName, cs.Nodes); } return null; }