By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,180 Members | 1,316 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,180 IT Pros & Developers. It's quick & easy.

Changing attributes at runtime

P: n/a
I need to change the "Browsable" attribute for one of my class' properties
at runtime (from "true" to "false"). The only way I can see how to do it is
via "ICustomTypeDescriptor.GetProperties()" which means implementing the
latter interface on my class, creating a customized "PropertyDescriptor",
etc. Basically a lot of work for something so simple. Is there an easier way
to do this. Thanks.
Jan 27 '07 #1
Share this Question
Share on Google+
2 Replies


P: n/a
John,

I found on the internet a very neat piece of work - called Property
Reflector, that I normally use - for quite some time - for these situations.
You can find the code at http://blog.guymahieu.com/?p=9.

I hope it helps!

--
Regards,
Robson Siqueira
Enterprise Architect
"John Allen" <no_spam@_nospam.comwrote in message
news:%2***************@TK2MSFTNGP02.phx.gbl...
>I need to change the "Browsable" attribute for one of my class' properties
at runtime (from "true" to "false"). The only way I can see how to do it is
via "ICustomTypeDescriptor.GetProperties()" which means implementing the
latter interface on my class, creating a customized "PropertyDescriptor",
etc. Basically a lot of work for something so simple. Is there an easier
way to do this. Thanks.

Jan 27 '07 #2

P: n/a
John,
>
I found on the internet a very neat piece of work - called Property
Reflector, that I normally use - for quite some time - for these
situations. You can find the code at http://blog.guymahieu.com/?p=9.

I hope it helps!
Thanks very much. I'll take a look.
Jan 28 '07 #3

This discussion thread is closed

Replies have been disabled for this discussion.