0

Hi!

I'm working on a project where I have classes displayed in a propertygrid control. Usually I could just assign some attributes to the classes, but they are generated from a scheme with a tool. So everytime I would regenerate the classes, the attributes would be deleted. So I need a way to hardcode these attributes to the property grid, I do not see another way. I thought I would just put in some if sentences for the typenames/propertynames and display my own strings on the propertygrid, but I do not know how...
Can anybody help?

Cheers!

3
Contributors
2
Replies
3
Views
8 Years
Discussion Span
Last Post by __avd
0

Could you mark the generated class as abstract and create a descendant class, override the members, and mark them with attributes? This would allow you to persist your changes if the base class was regenerated. I have a few instances where I do something like this and I have a little utility where I paste in the generated code and it changes the access modifiers and I paste it back in to visual studio.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.