|
-
May 12th, 2010, 10:16 AM
#16
Re: Reflection, create a class with dynamically named properties
I specifically said dictionary type as I did not want to suggest the dictionary directly. You have others for example using generics that could be used.
To go for a simple explaination, sub-class the dictionary. You do this because you can then modify the atttributes of the class to help with your display in the property grid.
You create an instance of this class within your 'data' class (er...Audio Tags?) and add a property for it.
When your 'data' class is then set to the property grid, you should see this sub-classed dictionary and be able to start your custom design.
Your 'data' class, has to exist, you must have something that explains what the object is, even if it is just a list of tags. A class called Song for example, could have at least a filename property and now you have this dictionary type property which is the list of tags.
Last edited by Grimfort; May 12th, 2010 at 10:19 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|