Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
DefaultValue for Tab Control ItemSize
Message
Information générale
Forum:
ASP.NET
Catégorie:
Code, syntaxe and commandes
Divers
Thread ID:
01057791
Message ID:
01057883
Vues:
17
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
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform