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 / December 2006

Tip: Looking for answers? Try searching our database.

Best practice for storing control state

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TEK - 08 Dec 2006 19:49 GMT
Hello

I'm wondering if any have good input on the best practice to use to
allow a (user)control to remember it's state.
For example, I have a UserControl that I use a lot of places in our
application. I want that contorl to remember it's UI state whenever the
user accesses that same control the next time he startes the
application. For example in a search control, I want to remember the if
the user selected to search by text or by number and automatically
pre-select that the next time the user enters the control.

The search control may occure many times in my application, and the
user may have different preferences for each of the occurrences.
I also want the UserControl to handle it as it would be a lot of
additional, and dublicated code, if I was to add it to the form that
contains the control.

The settings should be saved within the users profile.
We have a lot of simular stuff that the application ideally should
remember.

Any good ideas?
NB: I'm looking for design practices, not how to do actually code it.

If there is any good books on the topic of writing usercontrols I would
appricate input on that as well.

Regards TEK
gourmete - 11 Dec 2006 21:57 GMT
Hi!

Unfortunately I don?t know either. I work with the DevExpress
components. Most of them provide the very usefull method
SaveLayoutToXML and RestoreLayoutFromXML. You could download the trial
version of the component suite and install it with source files.
Perhaps you?ll find some inspiration in this sources while waiting for
more qualified answers :)

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.