I have a usercontrol with a Collection property. What I want to achieve is to be able to add/modify/remove items of some data types of that collection via VS designer (Property window/Collection editor).
I have a simple class:
public class Quantity
{
public string Name { get; set; }
public Type DataType { get; set; }
}
In my UserControl I have:
private ObservableCollection<Quantity> _quantities = new ObservableCollection<Quantity>();
public ObservableCollection<Quantity> Quantities
{
get { return _quantities; }
}
And the thing is that I am able to change the Name property via that VS Collection editor but I am unable to change DataType property that way.
So what do I have to do to make it work?