Back to Devexpress

Controller Class

expressappframework-devexpress-dot-expressapp-00bac005.md

latest11.8 KB
Original Source

Controller Class

The base class for Controllers.

Namespace : DevExpress.ExpressApp

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public abstract class Controller :
    Component,
    ISupportUpdate
vb
Public MustInherit Class Controller
    Inherits Component
    Implements ISupportUpdate

The following members return Controller objects:

Remarks

Use Controllers to change your application’s flow or implement custom user interaction. Custom code in a Controller is executed when XAF creates a Window or Frame for this Controller.

Controllers also serve as containers for Actions.

Controllers in XAF support dependency injection in .NET ASP.NET Core Blazor and Windows Forms applications.

To implement a Controller, inherit from the Controller class or one of its descendants, such as:

ViewControllerUsed to implement custom features in nested or root ViewsWindowControllerUsed to implement custom features in Windows.

Visual Studio Controller Template

The DevExpress Template Kit includes ready-to-use Controller templates that allow you to create a custom Controller in your project.

Note

CodeRush allows you to add Actions and Controllers with a few keystrokes. To learn about the Code Templates for XAF , refer to the following help topic: XAF Templates.

Built-in Controller Customization

XAF supplies built-in Controllers to perform basic functions in ASP.NET Core Blazor and Windows Forms applications. To customize the behavior of a particular Controller in code, inherit from it or subscribe to its events. For additional information, refer to the following topics:

XAF automatically instantiates public Controllers with public parameterless constructors.

Custom Code in Controllers

To provide custom code that XAF performs at runtime, use Controller’s activation and deactivation mechanisms.

To activate or deactivate a Controller, use the Controller.Active property.

To determine the current state of a Controller, use the Controller.Active property in a conditional expression. Alternatively, use the BoolList.ResultValue property of the object that the Controller.Active property returns.

To provide custom code that XAF executes each time a Controller is activated or deactivated, handle the Controller.Activated and Controller.Deactivated events or override the OnActivated and OnDeactivated methods.

To access a Controller’s Action collection in code, use the Controller.Actions property.

Implements

ISupportUpdate

Inheritance

Show 59 items

Object MarshalByRefObject Component Controller ReportServiceController

ActionControlsSiteController

ActionValidationController

ViewController

ChangeVariantController

WindowController

ListEditorInplaceEditController

PopupWindowTemplateClosingController

ObjectViewController<ViewType, ObjectType>

ObjectViewController

MyDetailsController

WinGridReportExportController

WinReportsController

WinReportServiceController

ModificationsController

NewObjectViewController

ProcessDataLockingInfoController

ViewController<ViewType>

BlazorExportController

BlazorModificationsController

PopupWindowTemplateSizeController

FileAttachmentController

FileAttachmentListViewController

RecordsNavigationController

RefreshController

ShowNavigationItemController

WindowTemplateController

AppearanceController

LogoffController

PersistenceValidationController

CloneObjectViewController

AboutInfoController

WorkingModeSwitchController

NotificationsController

WinNotificationsController

LinkUnlinkController

ListViewProcessCurrentObjectController

BlazorNewObjectViewController

CloseDetailViewController

BlazorHideDetailViewNewActionController

BlazorHideRefreshActionController

DashboardConfirmationUnsavedChangesController

ExportToXmlController

PreviewReportDialogController

PrintSelectionBaseController

ReportsControllerCore

HasRightsToModifyMemberController

DeleteObjectsViewController

DialogController

ExportController

FilterController

PrintingController

WinExportController

WinModificationsController

WinNewObjectViewController

See Also

Controller Members

DevExpress.ExpressApp Namespace