Please enable JavaScript to view this site.

CWT User Interface Design Handbook

<Stn:Form def:Name='LcdMainForm' Load='onLoad'>

Description

The Form control is the highest level in the controls hierarchy. This control is used as a container for all other controls in the user interface.

 

Properties

Below is a list of the properties that can be defined in a Form control. These will adjust the functionality as well as the look and feel of the control.

Load

Type:String of any length

Description:The Load property is used to express an entry point in the software DLL file used as CodeBehind DLL (see details below on CodeBehind). For terminals with an STN display, the entry point is always “onLoad”.

Name

Type:String of any length

Description:The name of the form is expressed with the Name property. The main form for the STN display is always named “LcdMainForm” to make it possible for the software to find the form and all sub-controls in the form when the terminal starts. For the main form, Name must be defined with the “def:” prefix (like in def:Name=”LcdMainForm”) to make it possible for the software to find and use the Form definition when the user interface is created from the ui.xaml file.

 

SUB-elements

The table below lists the sub-elements that can be defined in a Form control. The sub-elements add other controls to the form which creates a keyboard mapping for physical buttons in the terminal. One of the sub-elements also adds a software DLL reference that is used when connecting actions to buttons, etc.

CodeBehind

The CodeBehind sub-element in a form is used to register a reference to the software DLL used for the presentation layer. For terminals with STN display the CodeBehind DLL is “cdsappllcdcodebehind.dll”.

Controls

The Controls sub-element contains all sub controls related to the form. For the main form the Controls sub-element contains all other user interface controls defined.

Keyboard

Contains the mapping of all buttons for all CWT models. Each button is defined with the hardware id and information on what shall be executed when the button is pressed.

Examples

Example of an empty Form definition with the name “LcdMainForm”. The Load property is set to “onLoad” which always is the entry point in the software DLL for STN display terminals.

<Stn:Form def:Name='LcdMainForm' Load='onLoad'>
    <def:CodeBehind Src=''>
        <reference assembly='cdsappllcdcodebehind.dll'/>
    </def:CodeBehind>
    <Controls>
        - - -
    </Controls>
    <Keyboard>
        - - -
    </Keyboard>
</Stn:Form>