To access the properties of windows controls in multi threaded application, I have modified my code as specified here solution. Although for calling the "SetControlValueMethod" I also need to pass the type of control and its specific property as text. I am looking for more convenient approach for callingvoid SetControlValueMethod(Control controlType,string propertyName, object value)
- Can I have all controls as a enum as first parameter.
- can I have properties of the selected control appear for second parameter, I don’t want to type property name there. Can I have them appearing like enum for selected control?
No, that’s not that easily possible.
I mean, you can enumerate all controls and all of its properties, but this will only happen at runtime, not design time. You could write an AddIn for your IDE which parses your files, finds all controls, enumerates their properties and inserts this into the auto-completion thing.