Re: Once again - Object of type x...
Peter Osucha <[email protected]> Mon, 18 Dec 2006 15:27:00 -0500
| Newsgroups | gmane.comp.windows.devel.dotnet.cx |
|---|---|
| Message-ID | <[email protected]> |
> Thinking about it a little more... > Do your usercontrol nest other usercontrols from the same > project? If so, that may be the problem. > The designer for the "outer" usercontrol will be hosting a > usercontrol from the previous build. > The designer for the "outer" user control will be creating > GraphConfiguration based on the current class definition and > of course the "inner" user control (from the previous build) > will be using the GraphConfiguration from the previous build. Yes, they do. I left this out of the email of an hour ago but when I've asked on this topic in the past, I have made it a point to put that piece of info in (and been told I shouldn't have a problem with it). There is a 'BaseGraph' control that contains the majority of code and a few specific graph controls that host BaseGraph controls and provide, as expected, specific behavior. > > > If not, start the user controls OnLoad, painting, etc > routines with > > > code like this: > > > > > > if (this.DesignMode) > > > return; > > > > > > > I'll give this a whirl as well and see what happens. Though any > > further comment on my first response above (the one I said I didn't > understand) > > would be great. > > This is the generally recommended approach. > If you get into a habit of checking this.DesignMode it stops > a lot of unexpected problems (and helps to stop the IDE > feeling sluggish as it runs runtime code (possibly trying to > access databases, etc!)) How will this (or better yet, will it at all) help the situation where the project has 'nested' controls? =================================== This list is hosted by DevelopMentorĀ® http://www.develop.com View archives and manage your subscription(s) at http://discuss.develop.com