CTC WPF Client Generator - Features
CTC WPF View Controller Top of page

The CTC WPF View Controller is a control specifically designed to encapsulate everything related to the display of the generated forms/views, including all communication with the back-end EAE/AB Suite host system.

The control is implemented as a WPF control, allowing it to be added to any WPF application from which access to an EAE/AB Suite application is required.

Included with the generator is a default WPF application that utilises the CTC WPF View Controller. The View Controller is a flexible, customizable control that can be added to any WPF application. This allows customers to develop their own WPF solutions and include access to the EAE/AB Suite system as required. The default WPF application provides the starting point for customization.

Single CTC WPF View Controller
Typically, a user interface provides access to one host system and therefore one CTC WPF View Controller would be included in the WPF application as seen above. However, the View Controller has been designed to allow for multiple controls to be added to the same WPF application as seen below.

Multiple CTC WPF View Controllers

Tabbed view using Multiple CTC WPF View Controllers
This allows the creation of a WPF User Interface Application with:
  • multiple views to the same EAE/AB Suite application,
  • multiple views to different EAE/AB Suite applications on the same or different host systems,
  • or a combination of the above.

Major features of the CTC WPF View Controller include:
  • Complete host system session management.
  • Efficient Forms/Views Download Manager.
  • Support of Dynamic Properties allowing the EAE/AB Suite host application to set properties on controls at runtime.
  • Customization through flexible API and event handling.
  • Displaying alternative views allowing Form Designers to paint forms using tools like Microsoft Expression Blend.

See also the Runtime Architecture.

Configurable Controls Top of page

You can specify how a control is generated. Any property you can specify on a WPF Control can be specified on all CTC Controls, Standard Controls and Custom Controls.

The CTC Configurator provides a Properties Editor as seen below, which allows the user to edit the complete set of properties for a control. Properties can be added or removed to generate the look and feel as required.

Control Properties Editor
Examples of property edits:

The following shows the standard look and feel of the Push Button control.

Standard Push Button Look and Feel, No Editing
Simply removing the Background Color property from the Push Button achieves a default 3D effect.

Standard Push Button, Background Color Property Removed
Adding a Background Image to the buttons provides a different look and feel.

Standard Push Button, Background Image Added

Font Substitution Top of page

Options for Configuring Font Substitution
Fonts painted on the forms can be substituted with any font supported by WPF. When substituting fonts it may be necessary to specify a scaling factor to be applied to achieve a suitable font size.

Identification of Label Controls Top of page

The Generator enables identification of Label controls on a form allowing the user to configure and style individual Labels in different formats. Below is an example of a label painted as the heading on all forms.

Standard Label Control, No Editing

Standard Label Control with Highlighting Properties Added

Custom Controls Top of page

Custom Controls will enhance the user interface further. For example:
  • by substituting controls painted in the Development environment by additional WPF controls such as DatePicker, DataGrid and Charting controls
  • by implementing custom WPF controls
  • by implementing Third Party WPF controls. Many Third Party controls for Grid Views, Data Entry, Date and Time are available on the market.

Custom Controls replace controls painted on the form as in the example below where the DatePicker control replaces a date field painted as a TextBox.

Below are a few examples of how custom controls can enhance the User Interface. See complete list of custom controls delivered as part of the CTC WPF Client Generator.

Date Picker

TextBox configured to be replaced with DatePicker for Date Fields

Standard TextBox Date Field

DatePicker Control replacing the TextBox Date Field
Included with the CTC WPF Client Generator is a Visual Studio 2008 project containing examples of how to implement different types of custom controls, such as the DatePicker, a DataGrid control and a Charting control.

Data Grid
The DataGrid is a WPF control often used instead of the standard ListBox. The DataGrid offers many different presentation options such as defining multi columns with column headers, column sorting, column resizing, column reordering and alternating row styling. Below is an example.

Standard ListBox Control with Multi Columns


DataGrid Control replacing the Standard ListBox Control
with Multi Columns
The example below shows how the WPF Toolkit Charting control can replace the Standard ListBox and dynamically provide a chart from the data that otherwise would be displayed in the ListBox.

Standard ListBox Control with Multi Columns

Charting Control replacing the Standard ListBox Control

CopyFrom as Table Top of page

The option 'CopyFromAsTable' allows CopyFrom regions in CopyFrom ispecs to be generated as tables. Labels painted directly above the CopyFrom region can automatically be recognized as column headers. This is controlled by the option 'CopyFromAutoColumnHeaders'. The CopyFrom region can be generated either as a traditional table using the WPF Grid Layout control or as a WPF DataGrid control. This is specified via the CopyFromType option. Both the Grid Layout control and the DataGrid control provide properties allowing for customization of the look and feel of the CopyFrom region to suit local requirements.

Below is an example of a typical CopyFrom region generated as a table.

Standard CopyFrom Region

CopyFrom Region generated as a Table Grid including Automatic Column Header Detection

CopyFrom Region generated as a DataGrid control including Automatic Column Header Detection

Alternate Views Top of page

The Alternate Views feature is intended for those who want to use tools like the Microsoft Expression Blend for painting forms.

One of the benefits of WPF is the separation of presentation from data, which is achieved through the databinding capabilities. This allows the collaboration of forms designers and developers on a project, where the designers use specialized tools like Microsoft Expression Blend for painting forms while the developers can concentrate on the business logic.

The CTC WPF Client Generator creates a separate form and data class for each ispec. This separation enables painting alternative forms while still utilizing the data layer.

Creating an Alternate View is as simple as setting the AlternateViewCreate option and painting the form using Expression Blend. At runtime, when the user navigates to a form that has an alternate view specified, the CTC WPF View Controller will display the alternate view. Alternate Views can be specified for all ispecs in a bundle or for selected ispecs.

Normal Generated View

Alternate View with Layout Changes using Microsoft Expression Blend 3

Alternate View after Layout Changes

External Data Files Top of page

List controls such as ListBox, ComboBox, DataGrid and Charting can be configured to display external Xml formatted data files. List controls are a convenient way of displaying options for the end user to choose from and often it can be efficient to store and maintain these options in Xml formatted files outside of the EAE or AB Suite database.

List controls include additional properties that allow specification of the file path, an expression for extracting nodes, and columns to display in the list. The files can be automatically transferred from the server and cached locally on the client work station until a new version of the application is deployed. Rows and columns from the Xml file can be displayed automatically in the list according to specifications on the control, or manipulated in the code behind the form.

Example of ListBoxes displaying data from external Xml files

Automatic Setup of Application Infrastructure Files Top of page

The generator automatically installs all required infrastructure files into the bundle views directory. No manual steps are required for this. When running the generator for the first time on a new bundle, the infrastructure files are automatically copied to the output directory of the bundle. An option is provided for the generator to reinstall the infrastructure files when the files have been updated or new files have been added.

Automatic Compile and Build of the Generated Application Top of page

As part of the generate process, the generator can automatically compile the generated application and build the necessary dll’s. This is achieved using MSBuild, the build platform from Microsoft used by Visual Studio. Together with the option for configuring the Runtime parameters, this means the application is ready to deploy when the generation of the user interface application is complete.

Configuration of Runtime Parameters Top of page

Parameters for the runtime configuration of the generated application can be specified using the CTC Configurator. When any of the runtime configuration parameters are changed, the generator will update the <appSettings> section of the Web.config file. This provides a convenient way to maintain all configuration details in one place.

Runtime Parameters Configuration

Copy to Clipboard in Excel Format Top of page

Included with the generated WPF Application is an option allowing the end user to copy list data and data from a CopyFrom region to the clipboard in Excel format. When the end user selects a ListBox, DataGrid or clicks within a CopyFrom region, the option "Copy To Clipboard, Excel format" appears in the main menu allowing the end user to easily copy/paste data into an Excel spreadsheet for further analysis.

For further details on all features and capabilities see the following documents: