Your GenerateName function returns a name only if there is a stack overflow exception. You can just check if findname returns a value public static string GenerateName(SilverlightControl p...