This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
Hi, I am using WPF propertygrid to edit an instance of a object, which i had created with reflection. To create the instance i used "Activator.CreateInstance......." With the nice programm "Reflector" i saw, that my dynamic loaded assembly has an attribute with virtual getter and setter. Therefore i think, my programm crashs, when i add the instance to the selectedobject property of the propertygrid.
A part of the exception is no following:
My question is, is it possible to say to the propertygrid to which attributes are allowed and in my position this special kind is not allowed.
thanks,
tom |
|
|
There shouldn't be a problem with virtual getters and setters, nor with dynamically created types. I noticed that the MissingMethodException was referring to the getSignal method rather than the HighBusLoad getter; is it possible that your reflection code didn't emit getSignal? However, in answer to your specific question, the simplest way to exclude properties from the grid is to apply BrowsableAttribute(false). |
|
|
Hi ivan,
thanks for your answer. [quote user="ivan"] However, in answer to your specific question, the simplest way to exclude properties from the grid is to apply BrowsableAttribute(false). [/quote] it was very usefully for me. i checked one more time the assembly and saw that i used a old version. now, with the new version the propertygrid works very well. thanks a lot to the developer team. kind greetings tom |
|