c# - Generating TextBoxes to fill in a class -
i have several classes need have properties filled in. example:
class recordtype1 { public datetime date { get; set; } public string name { get; set; } public string value { get; set;} } class recordtype2 { public datetime date { get; set; } public string name { get; set; } public string location { get; set; } public float temperature { get; set; } } for recordtype1 generate datepicker fill in date , 2 textbox fill in both name , value. likewise recordtype2 datepicker , 3 textbox name,location, andtemperature`.
i create file containing separate usercontrol per class has required textblocks , textboxes seems if there better way generate form user fill in.
is kind of thing possible?
a quick-and-dirty way in winforms use propertygrid control. i'm not sure if there equivalent in wpf, host propertygrid control using windowsformshost.
Comments
Post a Comment