Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DefaultValue for Tab Control ItemSize
Message
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01057791
Message ID:
01057883
Views:
13
Hi,
>I am trying to set a DefaultValue for the ItemSize of a TabControl but I can't just get it right...
>
>
><DefaultValue(New System.Drawing.Size(0, 1))> Public Shadows Property ItemSize() As System.Drawing.Size
>            Get
>                Return MyBase.ItemSize
>            End Get
>            Set(ByVal Value As System.Drawing.Size)
>                MyBase.ItemSize = Value
>            End Set
>        End Property
>
>
>I get "Constant Expression is required." but I don't really understand...
>
I think the message says it all - DefaultValue only accepts constants and since Drawing.Size is a structure it's not acceptable. I've a vague idea you can get round this by using ShouldSerialize() (?) instead of DefaultValue but could be completely wrong !
HTH,
Viv
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform