PRB: "Invalid property value" Error Message While Setting Values for User Control Properties in Design View When Using Visual Studio .NET (818811)
The information in this article applies to:
- Microsoft .NET Framework 1.1
- Microsoft .NET Framework 1.0
SYMPTOMSIf you try to set the value of the BrowsableAttribute property to TRUE during design time in Microsoft Visual Studio .NET, and if the control class has certain types of properties, you receive the following error message: Invalid property
value The following are the types of control class properties that this situation applies to: CAUSEThis problem occurs because predefined type
converter classes are not available for the structures that are listed in "Symptoms". The default converters for the classes are as follows: | Class | Default Converter | | Point | PointConverter | | Size | SizeConverter | | Rectangle | RectangleConverter | Note You cannot use these default converters as the type converters
for PointF, SizeF and RectangleF. STATUS Microsoft
has confirmed that this is a problem in the Microsoft products that are listed
at the beginning of this article.
WORKAROUNDTo work around this problem, use one of the following methods:
Use different types for the properties that are to be exposed by the control: | Instead of this property: | Use this property: | | PointF | Point | | SizeF | Size | | RectangleF | Rectangle |
- or - Use type converters for PointF, SizeF and RectangleF. For more information about how to write type converters, see the "References" section of this article. REFERENCESFor additional information about implementing a type converter,
see the following MSDN documentation: For additional information about design time
support that is available in Visual Studio .NET, see the following MSDN documentation:
Modification Type: | Minor | Last Reviewed: | 4/21/2006 |
---|
Keywords: | kbDSWGDI2003Swept kbide kbControl kbprb KB818811 kbAudDeveloper |
---|
|