I have a control that has a list of Rods. The Rods have a few public properties:
public class Rod
{
float Angle { get; set; }
Color MainColour { get; set; }
int Length { get; set; }
int Width { get; set; }
//other private code here you need not be concerned with ;)
}
In the control that hosts the Rods, the list is declared as:
public List<Rod> Rods { get; set; }
I would like to be able to select a RodsHost control and click on the "Rods" property page, and edit the Rods on that control through the Forms Designer GUI. Currently, I can add Rods to the list, but not edit the Rod's properties (Angle, MainColour, etc...). I tried applying the attribute [DesignTimeVisible(true)]
to the Rods class, that didn't seem to work. I thought maybe I should use the Designer attribute, but I'm not sure which Designer class I need here. Anyone got a suggestion?