Log In
Home
Support
Demos
Documentation
Blogs
Training
Webinars
[Expand]General Information
[Expand]WinForms Controls
[Expand]ASP.NET Controls and MVC Extensions
[Expand]ASP.NET Bootstrap Controls
[Expand]WPF Controls
[Expand]Xamarin Controls
[Expand]Windows 10 App Controls
[Expand]Document Server
[Expand]Reporting
[Expand]Report Server
[Expand]Dashboard
[Collapse]eXpressApp Framework
 [Expand]Fundamentals
 [Expand]Getting Started
 [Expand]Concepts
 [Collapse]Design-Time Features
   Solution Wizard
   Template Gallery
   Application Designer
   Module Designer
   Model Editor
   Model Merge Tool
   Localization Tool
 [Expand]Functional Testing
 [Expand]Deployment
 [Expand]Task-Based Help
 [Expand]Frequently Asked Questions
 [Expand]API Reference
[Expand]CodeRush
[Expand]Cross-Platform Core Libraries
[Expand]Tools and Utilities
 End-User Documentation

Module Designer

The eXpressApp Framework provides the Module Designer, allowing you to view and customize module components: referenced modules, Controllers and business classes. Some of these customizations can also be done directly in code or using the Application Model. In addition, you can apply some module customizations in the Application Designer.

There are several ways to invoke the Module Designer. The first is to double-click the Module.cs (Module.vb) file located in a module project. Alternatively, you can right-click this file and select the View Designer item from the provided context menu. The image below shows the Module Designer.

As you can see, the Module Designer contains several sections. Each section is described in detail below.

Expanded Module Icon

Use this section to specify the preferred module name. For this purpose, use the editor under the module icon. In addition, you can set a description for this module by specifying the Description property in the Properties window.

This property value will be displayed when this module is selected in the Application Designer's Modules section.

Expanded Required Modules

An XAF application functionality relies on modules. Each module represents a particular feature, e.g. data validation, reporting, etc. The eXpessApp Framework supplies several built-in modules.

  • Basic Modules
    Represent the features that are required in every custom module.
  • Extra Modules
    Can be added when required, to any module or application project.

When implementing custom features in a module, you may need to use, extend or customize other modules. So, you will have to add these modules to your module. For this purpose, the Module Designer contains the Required Modules section. This section provides the following capabilities:

  • View the Modules Used in Your Module
    When running the application, all the modules listed in the Required Modules section will be loaded. When you invoke the Model Editor for a module, all the modules from the Required Modules list will be loaded together with this module.
  • \
  • Add an XAF Module

    Drag the module from the Toolbox's DX.17.1: XAF Modules page to the Required Modules section.

    An alternative way to add the required module to your module is to override the GetRequiredModuleTypeCore method in your ModuleBase class descendant.

    You can also add a module to an application project (not to an application module). For details, refer to the Application Designer topic.

  • Add a Custom Module

    If you implement custom modules in an XAF solution, the corresponding items are automatically added to the Toolbox. Drag the required module from the Toolbox's corresponding page to the Required Modules section.

  • Remove a Module

    Right-click the required module and select Delete.

Expanded Controllers

The Controllers section allows you to view the list of the current module Controllers, and the Controllers of the modules listed in the Required Modules section. If a Controller contains Actions, they are listed as well. To see them, expand the required Controller's node.

All the Controllers listed in this section will be created in the application to which the current module is added.

Expanded Exported Types

The Exported Types section allows you to specify the business classes that should be loaded to the Application Model; that is, the classes that will take part in the application's business model.

This section lists the following business classes:

  • Classes implemented in the current module.
  • Classes that are implemented in the assemblies referenced in the current module.
  • Classes that are implemented in the modules added to the current module Required Modules list.

Only classes marked in bold will be loaded to the Application Model. To mark a particular class, use one of the following techniques:

  • Select a class and press the SPACEBAR.
  • Right-click a class and select the Use Type in Application item in the invoked context menu.

To view or edit the information on a particular class in the Application Model, invoke the Model Editor and navigate to the BOModel | <Class> node. In addition, you can view or edit the information that will be used when generating Views for business classes. For this purpose, navigate to the Views node.

Note

When adding a class, all the related classes are added as well.

You can add all the classes from a particular assembly at once. For this purpose, use the same techniques utilized for adding an individual class (see above).

To remove a business class from the list of the classes that are loaded to the Application Model, press the SPACEBAR again, or use the context menu.

Note

The classes from the modules listed in the Required Modules section are always marked in bold. Adding them to the Application Model cannot be cancelled.

An alternative way to add business classes to the Application Model is to use the ModuleBase.AdditionalExportedTypes collection in a module constructor.

Expanded Important Note

Do not forget to rebuild your solution after making changes in the Module Designer. Otherwise, you will not see them in the Model Editor.

Expanded See Also

How would you rate this topic?​​​​​​​