I've got all of the properties for the engine's Object class registered using reflection :
PropertyDescriptorCollection propertyCollection = new PropertyDescriptorCollection(null, false);
// Get the properties
if( myObject != null )
{
// Add the properties for the object
PropertyInfo[] propertyInfo = myObject.GetType().GetProperties();
foreach( PropertyInfo property in propertyInfo )
{
if( property.Name == "ID" )
{
propertyCollection.Add( new EngineObjectPropertyDescriptor(myObject, property.Name) );
}
}
So at runtime the Object (myObject) get's it's ID member added to the PropertyGrid. I'm just testing this out on a single class member, so I can get the process down.
I've got Get/Set methods in the EngineObjectPropertyDescriptor, but they're just operating on the basic object type... is this where I need to trigger my custom property editor (in this case the Texture Browser)? It seems like the Set method would only get called once a value has been entered in to the text box for the string property (assuming I use a string to display to the user). At the moment Set is only getting called if I set the PropertyType to int32.