I am wondering if there is a way to check the visibility of a field using the C# code file in InfoPath 2010? I need to evaluate only fields that are not hidden and cannot find a code-side method to help me. Any ideas? Thanks!
Well there is, but not the way you describe. Have a look what action (conditional formatting) hides your field in InfoPath - for example: the MyValue field gets hidden when it's value is over 9000; so in your code you just have to check whether the value is over 9000 (hidden) or not (shown).
A even better way to solve this is to create a trigger for each field. The MyValue field just stores the value and does not trigger any conditional formatting which improves the isolation of the code and the InfoPath form. The trigger field (i.e. MyValueTrigger) has the actual formular as it's default value (i.e. MyValue > 9000) and as soon as the formular evaluates it returns either 0 or 1 (TRUE or FALSE if you like) and then you can make the check against the trigger field.