As soon as I click the "(Collection)" button to open a CollectionControlDialog, it will throw an exception.
It appears to be caused by having a List property inside of another List property.
Here is some code which will always throw a System.NullReferenceException.
If you initialise MyStringList via the constructor, it will throw a System.Reflection.TargetParameterCountException instead.
Removing the MyStringList property will stop all exceptions.
It appears to be caused by having a List property inside of another List property.
Here is some code which will always throw a System.NullReferenceException.
If you initialise MyStringList via the constructor, it will throw a System.Reflection.TargetParameterCountException instead.
Removing the MyStringList property will stop all exceptions.
public MainWindow()
{
InitializeComponent();
PropertyGrid.SelectedObject = new MyContainerClass();
}
public class MyContainerClass
{
public MyContainerClass()
{
MyClassList = new List<MyClass>();
MyClassList.Add(new MyClass());
}
public List<MyClass> MyClassList { get; set; }
}
public class MyClass
{
public List<string> MyStringList { get; set; }
}
The XAML for "PropertyGrid" is simply<xctk:PropertyGrid x:Name="PropertyGrid" />
My Windows build version is 10586.420.