VersaForms Library .Net


The purpose of the VersaForms library is to provide an intelligent automatic system which will control the layout of user interface forms so that all the developer needs to do is supply the child controls the form should contain together with some constraints on layout, and the system will do the rest. The advantages of this to the developer are potentially vast, some of them are listed below. There are some other attempts to provide this functionality in existence, notably the FlowLayoutPanel and TableLayoutPanel objects in the beta 2.0 .Net framework, but we believe that the layout algorithms provided in VersaForms achieve this better than any other existing system.

This library is targetted on the 1.1 .Net framework and consequently provides a basic interpreter for XAML-like scripts allowing you to automatically build your interface using a script, as this kind of layout control make it much simpler to take advantage of this approach. Avalon and XAML-compatible versions of these layout controls will follow to use with the 2.0 framework.

VersaForms is a .Net library written in 100% C#, fully designable in Visual Studio.

Features and Benefits

  • You want your application's layout to have resolution independence.

    The VersaForms library provides a much better solution to this problem than conventional form resizers which scale the entire form including its fonts.  Possibly the main reason that users will use lower screen resolutions is because of long sightedness.  In this case a conventional form resizer will be worse than useless because it will maintain the size of controls in physical dimensions which does not help the long sighted user whilst lowering their resolution, making them more aliased and consequently harder to read.

    The VersaForms library changes the form layout when resolution is reduced so that controls become larger in physical dimensions whilst avoiding windows' contents extending beyond their bounds horizontally requiring horizontal scrollbars which are very awkward to use on data entry forms.

  • You want to separate presentation from code.

    The visual design system in Visual Studio for various reasons stores its output as code.  As compared with storing the presentation layer as a script, this has various disadvantages.  Scripts are easier for advanced users or design staff to edit to change the visual appearence of the application.  They can be held centrally so such changes are automatically propagated to all applications.  Automatic changes to presentation (e.g. the user adds a user defined field to a form) are much easier to code when they are made to a script rather than the program's own code.

  • You want to write an internationalised application.

    VersaForms provides two major advantages when writing an internationalised application.  The first is that there is no need to leave gaps in label text appearing on forms to allow for longer text in different languages.  The second is that the XML script reader in VersaForms will automatically translate fixed text elements of the layout using resource files.  Additionally, VersaForms will automatically flip the layout of a form from right to left when using languages whose text is read from right to left.

  • You want your application to be easily portable to 'Longhorn'.

    It is a simple matter to translate the XML script defining your presentation layer to XAML. A version of the FlowGridPanel which is the flow container within VersaForms will be released with compatibility with Microsoft's Avalon library when 'Longhorn' is released to aid conversion.

  • You want to write an application with different views of the same form for different users.

    VersaForms is a big help here because you can remove controls for fields not accessible to certain users from a form without causing unsightly gaps.  The layout will automatically change to accommodate the removed controls.

  • You want to store visual style rules for your application in a central file (like a CSS file for HTML).

    VersaForms will help you here because when loading an Object Tree XML file, you can preprocess it with an XSLT file.  This can define complex style rules, overriding or adding visual attributes to the objects described in the basic script.  These can then be changed in one place for all forms in an application.

  • You want to increase a user's ability to customise the visual appearence of their application.

    If you wish to allow a user to customise their application by for instance adding new data fields, or changing the arrangement of subwindows of data, VersaForms will help by automatically rectifying layout to include the users changes in terms of a form's size changing or the addition of new controls to it.

  • You want to avoid spending hours realigning controls to pixel accuracy when a user requests a change in layout to a form.

    All you will need to do is make a few changes to an XML script - VersaForms can ensure consistent pixel accurate layout is achieved without a trace of eyestrain.