
Adding a user control property thats a class or structure
Ive posted this in vb.net and
CSharp because if someone can show this in
csharp I can convert it to vb.net for my use.
I have a class, MsgBoxParts that I want to use as a property for my
textboxex control, but when its in the designer, it shows the property
grayed out in the property grid. I want it to look like the Location
property would, with a plus that expands it to list the properties of this
class (in location its X and Y). I know this is possible, I just skimmed an
article the other week on it but I cant for the life of me find the article
now. It was on MSDN, WindowForms.Net or some website on the .net languages.
So could someone shed some light on how to make it show up this way? Thanks.
<Description("Customized error message, only used if custom validation is
selected " & _
"or AlwaysUseCustomError is true."), Category("Validation")> _
Property CustomErrorMessage() As MsgBoxParts
Get
Return _CustomErrorMessage
End Get
Set(ByVal Value As MsgBoxParts)
If _ValidationPattern = Expressions.Custom Or _AlwaysUseCustomError Then
_ErrorMessage = Value
End If
_CustomErrorMessage = Value
End Set
End Property