I use the following code to create a list of objects that can be assigned with values and have unique names in the UI.
public class Test
{
private int _length;
private Color _color;
private Dictionary<string,object> array2 = new ();
[Display(Name = "List of Objects")]
public Dictionary<string, object> ObjectList
{
get { return array2; }
set { array2 = value; }
}
public Test()
{
array2.Add("test1",_length);
array2.Add("test2", _color);
}
....
}
For result pls. see attached file !
How can I remove/change string "Count:" - string in second column (upper right corner) ?
When I use GroupName in DisplayAttribute this will have no effect, how can I change UI-look by also grouping values ?
e.g. [Display(Name = "List of Objects", GroupName = "XYZ")]
I can also not select colors anymore, which worked when I used List.