This utility class processes a component's InitializeComponent method to get component information. Usually this will be a WinForm and the associated control information. Component is the base of all controls so I will say component throughout since this could be a Form, Control or UserControl. Simply create a new instance of the ComponentDictionary giving it a TypeNode of the component you want to process.

Once the InitializeComponent has been processed, you can look at the Components property which is a Dictionary with each component field being a key and the value being a ComponentInfo class. The key can also be the "This" node which represents the component. The ComponentInfo is another Dictionary that is keyed off the property name, such as "TabIndex" with the value being the value obtained from the InitializeComponent code or the associated resource file. See the FollowAccessibilityRules for an example of how to use this.

Last edited Aug 22, 2007 at 9:15 PM by JeffLeBert, version 1

Comments

No comments yet.