Manages an XAF application.
public abstract class XafApplication : Component, INotifyPropertyChanged, ISupportInitialize, IApplicationModelManagerProvider, IInternalCollectionSourceCreating
Public MustInherit Class XafApplication Inherits Component Implements INotifyPropertyChanged, ISupportInitialize, IApplicationModelManagerProvider, IInternalCollectionSourceCreating
Related API Members
The following members accept/return XafApplication objects:
The XafApplication class has methods to create Controllers, Views, Object Space(see BaseObjectSpace) and other XAF elements. Its properties provide the application name and title, configuration string, access to the Application Model, modules and the strategy that manages the View display. You can customize many built-in mechanisms for managing the application. For this purpose, use the XafApplication‘s events.
Since the XafApplication object can be useful at many points in your code, it must be easily accessed. The following properties provide access to the current application: ActionBase.Application, Controller.Application, Frame.Application, CustomizePopupWindowParamsEventArgs.Application, CreateCustomTemplateEventArgs.Application, etc.
The XafApplication class’ descendant is automatically created and initialized in both ASP.NET Web and Windows Forms applications, as well as in the Application Server service. In an ASP.NET Web Forms application, it is created and initialized when a session starts; in a Windows Forms applications - in the Main method; in an Application Server service - in the ApplicationServerService constructor. See the Global.asax.cs (Global.asax.vb), Program.cs (Program.vb) and ApplicationServerService.cs (ApplicationServerService.vb) files respectively.
To configure your application, use the Application Designer (not available for the Application Server). The settings that you cannot set in the Designer can be set via one of the XafApplication.Setup method overloads, or by specifying properties between the application’s creation and setup.