I recently updated to Rhino 6.29. I am working on a plugin with RhinoCommon that contains one EtoPanel with all of the UI inside an Eto TreeGridView. After the update, when I opened Rhino and interacted with the tree, I get a crash error that says ‘Specified element is already the logical child of another element. Disconnect it first.’ This tree and panel had been working properly until now.
I understand that this is coming from the windows or eto framework but do not know how to proceed. Does anyone have some advice for figuring out what is causing this crash?
After lots of digging, I discovered the problem occurs when I use a CustomCell class as the DataCell in the single column of the TreeGridView. Using a TextBoxCell kept the crash from occurring. Now my question would be how do I setup the CustomCell to avoid this crash or is it a bug?
I had been using the following code which worked:
DataCell = new CustomCell
CreateCell = (args) => (returns a newly constructed panel depending on the type of the args.Item)
ConfigureCell = (args, control) => control.DataContext = args.Item;
This indeed broke all of my gridview and treegridview implementations.