bodong1987 / Avalonia.PropertyGrid

A property edit control in Avalonia like DevExpress's PropertyGridControl.
https://www.cnblogs.com/bodong
MIT License
184 stars 19 forks source link

[Bug] BoundedList with custom type doesn't work properly #7

Closed Elscrux closed 1 year ago

Elscrux commented 1 year ago

I really like what you've done, although I've stumbled over some issues trying it out. Annotating a custom class with [TypeConverter(typeof(ExpandableObjectConverter))] doesn't show the properties of the class, just the ToString() value. Adding a custom AbstractCellEditFactory that can handle the custom class seems to be a workaround for this, but it would be nice to have a native way to support these kinds of lists.

[TypeConverter(typeof(ExpandableObjectConverter))]
public class Vector3 : MiniReactiveObject { ... }
public BindingList<Vector3> PositionsList { get; set; } = new()

This shows all properties of Vector3 as expected:

public Vector3 Position { get; set; }
bodong1987 commented 1 year ago

Thank you for your feedback, I have fixed this issue in the latest rc version.