473,382 Members | 1,646 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,382 software developers and data experts.

design time serialization (code generation)

Hi,

I'm trying to write a Control (inherited from Control) which contains
four panels. These panels are created in the constructor, and are
read-only.

The individual properties of the panels can be set through the
properties window, any changes will be visible in design-time.
However, when I run the application, the properties are lost.

No code is generated which sets the (modified) properties of these
panels.
Could somebody tell me what should be done in order for this to work
correctly?

Thanks in advance,

- WebWacker
Nov 16 '05 #1
2 1743
WebWacker,

All you have to do is expose the panels as public properties on your
control, and they will be visible in the properties window. Any changes you
make to the panels in the property window (through the properties that they
are exposed as) will cause the appropriate code to be placed in the
designer-generated file.

Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"WebWacker" <we********@home.nl> wrote in message
news:e5*************************@posting.google.co m...
Hi,

I'm trying to write a Control (inherited from Control) which contains
four panels. These panels are created in the constructor, and are
read-only.

The individual properties of the panels can be set through the
properties window, any changes will be visible in design-time.
However, when I run the application, the properties are lost.

No code is generated which sets the (modified) properties of these
panels.
Could somebody tell me what should be done in order for this to work
correctly?

Thanks in advance,

- WebWacker

Nov 16 '05 #2
Hi,

Thanks for your reply, but I already tried exposing the panels as
public properties (read-only).
I can change various settings in design-time, and they are visible
until run-time, but no code is generated.

I've played around a little.
When I set the panel-properties to read/write and set a panel to one I
added to my form, it does generate code for the panel properties. But
this is just a "normal" panel set to my control at a later time.

So it seems that code won't be generated for nested-properties?
I then tried the DesignerSerializationVisibilityAttribute with a value
of Content. This doesn't work either.

I greatly appreciate your help, any suggestions are welcome :)

- WebWacker
Nov 16 '05 #3

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

Similar topics

9
by: bigoxygen | last post by:
Hi. I'm using a 3 tier FrontController Design for my web application right now. The problem is that I'm finding to have to duplicate a lot of code for similar functions; for example, listing...
4
by: clintonG | last post by:
I'd like to know about application(s) or the name by which the following process is referred which would allow a business analyst to enter the following statements which when submitted would result...
9
by: sk | last post by:
I have an applicaton in which I collect data for different parameters for a set of devices. The data are entered into a single table, each set of name, value pairs time-stamped and associated with...
1
by: Thomas Qvist | last post by:
We are building a suite of programs consisting of both winforms applications and office addins. We would like to pre-generate the xml-serialization classes and add it to our project to avoid...
2
by: Paul Cheetham | last post by:
Hi, I have moved an application from VS2003 to VS2005, and I am now unable to view most of my forms in the designer. The majority of the forms in my project are derived from class PACForm,...
7
by: JJ | last post by:
Having done most of the background sql coding I'm now ready to start designing my asp.net web pages. A basic question though - is there a way of having 'common' elements on pages (e.g. a...
3
by: --== Alain ==-- | last post by:
Hi, I've created a Form just for testing purposes. on this form i have a custom control that i created. Every time that i update my custom control (dll file), my test form displays the...
14
by: Dave Rahardja | last post by:
Is there a way to generate a series of statements based on the data members of a structure at compile time? I have a function that reverses the endianness of any data structure: /// Reverse...
13
by: news.microsoft.com | last post by:
I'm trying to develop a ASP.NET app with OO + 3-tier design, here is a scenario: if there is a People class which is defined as below, class People { string ID; string FirstName; string...
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...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?

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.