![]() |
Bitmap property of custom control, object cannot be created
Hi,
I have build a custom control with a Bitmap property inside: System::Drawing::Bitmap* myBitmap; __property System::Drawing::Bitmap* get_Bitmap( void ) {return myBitmap;} __property void set_Bitmap( System::Drawing::Bitmap* tmpBitmap) {myBitmap = tmpBitmap;} When dragging my control onto a webform the corresponding .aspx file looks like following: <cc1:ctrl id="myCtrl1" style="Z-INDEX: 102; LEFT: 48px; POSITION: absolute; TOP: 128px" runat="server" Width="536px" Height="224px" Bitmap="System.Drawing.Bitmap"> </cc1:ctrl> 1) The parser rises at design time the error: "Parser Error: Cannot create an object of type 'System.Drawing.Bitmap' from its string representation 'System.Drawing.Bitmap' for the 'Bitmap' property" What is wrong? Which class- or property-attributes (e.g. ParseChildren ....) must be set? What else is to be done? 2) Is it possible at design time to save values of complex properties to the the .resx file of the webform? With windows forms controls the ide (e.g. Visual Studio 2003) uses codeDOMSerialization to do that, but I didn't succeed in doing it with a web server control. Thanks. |
| All times are GMT. The time now is 11:05 PM. |
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.