473,320 Members | 1,887 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

About User Controls

Raj
Hi,

I have created a Windows 'user control' in C#.NET. This user control defines
several public 'properties' that the outer world can use to tweak the
behavior of the user control. However, whenver I drag the user control to a
Form, I noticed that the 'Windows Form Designer generated code' contains
several auto generated statments to initialize the 'properties' that are not
proper. This causes the Form designer to get corrupt and shows a designer
error in design mode. This happens each time I build the code!!!

The property that is defined is
public object[] UserControlData
{ set { } get { } }

and it is getting assigned the foll value due to which it is getting
corrupted:
this.expertTimeline1.UserControlData = new object[0] { new System.Double[]
{ 1E+108}, new System.Double[] {1E+108}};

Is there someway to prevent the auto generation of code?
Is there some way to define default values for the properties?
Is there something wrong in the way I am defining the methods?
Thanks & Regards,
Raj

Nov 17 '05 #1
1 2319
Just one post is enough man!

I answered this over in the controls group.

--
Bob Powell [MVP]
Visual C#, System.Drawing

Ramuseco Limited .NET consulting
http://www.ramuseco.com

Find great Windows Forms articles in Windows Forms Tips and Tricks
http://www.bobpowell.net/tipstricks.htm

Answer those GDI+ questions with the GDI+ FAQ
http://www.bobpowell.net/faqmain.htm

All new articles provide code in C# and VB.NET.
Subscribe to the RSS feeds provided and never miss a new article.

"Raj" <ra*************@networkgeneral.com> wrote in message
news:%2****************@TK2MSFTNGP15.phx.gbl...
Hi,

I have created a Windows 'user control' in C#.NET. This user control
defines
several public 'properties' that the outer world can use to tweak the
behavior of the user control. However, whenver I drag the user control to
a
Form, I noticed that the 'Windows Form Designer generated code' contains
several auto generated statments to initialize the 'properties' that are
not
proper. This causes the Form designer to get corrupt and shows a designer
error in design mode. This happens each time I build the code!!!

The property that is defined is
public object[] UserControlData
{ set { } get { } }

and it is getting assigned the foll value due to which it is getting
corrupted:
this.expertTimeline1.UserControlData = new object[0] { new
System.Double[]
{ 1E+108}, new System.Double[] {1E+108}};

Is there someway to prevent the auto generation of code?
Is there some way to define default values for the properties?
Is there something wrong in the way I am defining the methods?
Thanks & Regards,
Raj

Nov 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: William Ryan | last post by:
Well, that depends. http://www.amazon.com/exec/obidos/tg/detail/- /0672320681/qid=1056861878/sr=1-1/ref=sr_1_1/002-7953039- 7491213?v=glance&s=books Is a must read IMHO for any ASP.NET...
1
by: William Ryan | last post by:
Well, that depends. http://www.amazon.com/exec/obidos/tg/detail/- /0672320681/qid=1056861878/sr=1-1/ref=sr_1_1/002-7953039- 7491213?v=glance&s=books Is a must read IMHO for any ASP.NET...
0
by: Jason | last post by:
I am pretty new to C# so bare with me... The design of my website utilizes tables on every page that look almost identical, save the data they are displaying. I have written the code to create...
4
by: Jason | last post by:
I am pretty new to C# so bare with me... The design of my website utilizes tables on every page that look almost identical, save the data they are displaying. I have written the code to create...
1
by: Robert Howells | last post by:
Perhaps I'm just too new at this to pull it off, or perhaps it's just bad architecture. I'd appreciate some feedback on the the wisdom (or lack thereof) in attempting the following: I'm not new...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.