Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Windows Forms / WinForm Controls / September 2006

Tip: Looking for answers? Try searching our database.

WinForms UserControl design mode property settings not persisting! (VS 05)

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Scott F. - 12 Sep 2006 18:16 GMT
I'm doing a WinForms UserControl and my property settings in design
mode don't seem to be persisting at all.

The deal is, I've got a BUNCH of screens that are pretty much the same,
so I made a UserControl (with a bunch of fields on it that can be
turned on and off via propertys and methods) and dropped copies of it
on several tabs of a TabControl.

Then, when I set their settings in design mode, they seem to stick, but
then I run the app and ... poof, nothing's right. All the settings are
out the window.  In fact, its even ignoring the default settings I have
set up in the UC's code using ResetPROPNAME() and
ShouldSerializePROPNAME().

Any suggestions, help, whatever greatly appreciated!

Thanks,
-S
Scott F. - 14 Sep 2006 18:03 GMT
Hey Microsoft.. is it ok with you guys that these are the kinds of
comments being made about usercontrols?!

<ME> Visual Studio 2005 is a complete PIECE OF POO when dealing with
UserControls on TabControl pages.
<Coder #1> amen!
<Coder #2> you could just drop the 'on TabControl pages' qualifier on
that....
<ME> so.. usercontrols are f%^ked eh?
<ME> I mean... apparently they are.
<ME> this is SO f'ed.
<ME> I've got ELEVEN tabs with screens/contents SO similar, I wrote a
user control.  But no, apparently I'm not allowed to do this.
<ME> I even moved the uc out to its own project, no help.  Still f'ed.
<Coder #2> well I mean usercontrols work as designed, as long as you
don't attempt to use the designer with them *at all*
<ME> its like, it does the opposite of all of my properties defaults.
<Coder #2> but the designer f.cks them over something fierce
<ME> yes, thats .. apparent now.
<ME> wtf?!
<ME> Do they know about this horrid bug?
<Coder #2> *shrug*...it was worse in 2003...

Now, it turns out that Coder #2 was talking about usercontrols (uc) in
ASP.Net, but what I have found is that its true for winforms uc's as
well!  The problem below is apparently a HUGE BUG in VS '05's forms
designer.  Each time I get one usercontrol all set up on one tab page,
then try to drop another instance onto another, the last one's
properties are all switched to the OPPOSITE of their defaults etc.
Sure wish I knew how to at least work around this.  I have tried to
simply go into the forms .designer.cs file and fix things there and NOT
touch anything through the visual designer etc. (which, needless to say
SHOULD work properly), but even that fails.

Very sad,
-S

> I'm doing a WinForms UserControl and my property settings in design
> mode don't seem to be persisting at all.
[quoted text clipped - 14 lines]
> Thanks,
> -S

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.