I have a .net PropertyGrid. I select an object to view, and the property of this object is Vector3. I can use ExpandableObjectConverter to automatically display Vector3 properties in a PropertyGrid. Everything is fine, except that when choosing an object I would like Vector3 to be expanded by default, i.e. You can see X, Y and Z without pressing [+]. How can i do this?
// Managed C++ : [TypeConverter(ExpandableObjectConverter::typeid)] public ref struct Vector3 { Vector3(float _x, float _y, float _z) : x(_x) , y(_y) , z(_z) {} float x, y, z; property float X { float get() { return x; } } property float Y { float get() { return y; } } property float Z { float get() { return z; } } };
source share