Best-Practice - UserControls instead of Forms
Categories: UserControls, UserControls Switching
|
Tags: Developers, Navigation, 1. Beginner, 2. Intermediate, Navigation, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
Revision:
1
Posted:
28/March/2010
Updated:
08/Aug/2010
Status:
Publish
Types: Article
|
 OverviewThis article describes a best-practice for Visual WebGui by which you would use UserControls instead of Forms for alternating the displayed UI. DetailsA Visual WebGui best practice is to only use Forms in these situations:
- When you want to show dialog windows.
- When you need different access points to your application Different Forms with which the application can start.
In all other situations the best practice would be to use UserControls instead of Forms. Your Form could contain a UserControl with Dock.Fill on the Form for example and when you want to switch screens, you could simply set the Visible property of the UserControl to false and the Visible property of a different UserControl to true and the other one will be shown instead.
This will in turn allow you to:
- Switch views very easily without having to use a mechanism for navigating to a different Form.
- Get a much faster and more efficient switch between application views.
- Choose the view you would like to start with based on your server-side logic (IP address or user permissions of the user for example) while the users are all still using the same page URL.
- Have a much more organized application solution, as you will be able to store all your different views (UserControls) with their own specific functionalities, in designated project folders.
ReferencesCode ExamplesVersion 6.4 or newer is required to build the code sample sucessfully. See Also
About the author
Related Articles
|
UserControls
|
|
|
This video demonstrates how to work with user controls.
Tags:
Developers, Drag & Drop, 1. Beginner, 2. Intermediate, 3. Advanced, Customization, Layouting, Pre v6.3, v6.3, v6.4 and Later
|
|
|
This sample application was created on VWG v6.3.x.
The creator of this application suggests that VWG v6.4 would give much greater flexibility.
Tags:
Architects, Developers, Events, Resource Handlers, VB.NET, 2. Intermediate, 3. Advanced, Customization, Layouting, Pre v6.3, v6.3
|
|
|
Tags:
Architects, Developers, Data Binding, 2. Intermediate, 3. Advanced, Data Binding, Pre v6.3, v6.3, v6.4 and Later
|
|
|
This sample code demonstrates working with user controls to simulate frames
Tags:
Developers, Navigation, 1. Beginner, 2. Intermediate, Navigation, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
Tags:
Developers, Navigation, 1. Beginner, 2. Intermediate, Navigation, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
Tags:
Developers, Navigation, 1. Beginner, 2. Intermediate, Navigation, Pre v6.3, v6.3, v6.4 and Later, 3. Advanced
|
|
|
|