![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
|
Hello everyone. I need some help with how to set default values for 'complex' properties. My problem is this: I have a control with a property CellStyle of type TableItemStyle. I want to initialise this property with some default values eg. CellStyle.ForeColor="Gray" etc. With a basic datatype i would just use the DefaultValueAttribute eg for a bool I'd add the attribute: [DefaultValue(true)] How can i do this for my CellStyle property? My workaround so far is to just inititialise CellStyle in the contstructor, which works to the extend that the values I set in the constructor are all displayed in VS, however I would like the IDE to know that the values are default values (because the IDE adds all values it thinks are not default to the tag definition in the aspx file eg adds CellStyle Font-Size="12px" Height="32px" BackColor="#D6D3CE"></CellStyle to the control tag even though these are the default values). |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |