[RESOLVED] Enumerated Property in Custom User Control
Hey all,
I'm new to the forums and .NET in general so hopefully this isn't TOO stupid of a question.
I'm trying to create a custom control to help with some user input validation. I basically want to provide an enumerated type for a text box so that developers can let me know what kind of validation they need. In VB6, it was as simple as this (simplified code):
Public Enum EInputType
InputText = 0
InputDollar = 1
End Enum
Private minputType as EInputType
Public Property Get InputType as EInputType
InputType = minputType
End Property
Public Property Let InputType(inValue as EInputType)
minputType = inValue
End Property
At design time, the developer would then be given the dropdown list of options (text or dollar) to choose from.
So I'm trying this in .NET, the only difference being the syntax of the property let/get, but the custom property will NOT show at design time though I can set it at run time. Anyone know what gives? I tried the "DesignerSerializationVisibility" property but that didn't provide any results, and I even changed the name of the property just in case "InputType" was a reserved word of some kind.
Any help would be appreciated.
Thanks,
Nathan
Hey all,
I'm new to the forums and .NET in general so hopefully this isn't TOO stupid of a question.
I'm trying to create a custom control to help with some user input validation. I basically want to provide an enumerated type for a text box so that developers can let me know what kind of validation they need. In VB6, it was as simple as this (simplified code):
Public Enum EInputType
InputText = 0
InputDollar = 1
End Enum
Private minputType as EInputType
Public Property Get InputType as EInputType
InputType = minputType
End Property
Public Property Let InputType(inValue as EInputType)
minputType = inValue
End Property
At design time, the developer would then be given the dropdown list of options (text or dollar) to choose from.
So I'm trying this in .NET, the only difference being the syntax of the property let/get, but the custom property will NOT show at design time though I can set it at run time. Anyone know what gives? I tried the "DesignerSerializationVisibility" property but that didn't provide any results, and I even changed the name of the property just in case "InputType" was a reserved word of some kind.
Any help would be appreciated.
Thanks,
Nathan
Last edited: