The requested page is not available for the requested platform. You are viewing the content for .NET Framework 4.5.2+ platform.
.NET Framework 4.5.2+
.NET Framework 4.5.2+
.NET Standard 2.0+
.NET Core 3.0+

XafApplication.CreateController<ControllerType>() Method

Creates a Controller of a specified type. If there is a Controller of the same type, assigns its settings to the new Controller.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.2.dll

Declaration

public virtual ControllerType CreateController<ControllerType>()
    where ControllerType : Controller, new()
Public Overridable Function CreateController(Of ControllerType As {Controller, New}) As ControllerType
public virtual ControllerType CreateController<ControllerType>()
    where ControllerType : Controller, new()
Public Overridable Function CreateController(Of ControllerType As {Controller, New}) As ControllerType
public virtual ControllerType CreateController<ControllerType>()
    where ControllerType : Controller, new()
Public Overridable Function CreateController(Of ControllerType As {Controller, New}) As ControllerType

Returns

Type Description
ControllerType

A Controller of the specified type.

Returns

Type Description
ControllerType

A Controller of the specified type.

Returns

Type Description
ControllerType

A Controller of the specified type.

Type Parameters

Name Description
ControllerType

Type Parameters

Name Description
ControllerType

Type Parameters

Name Description
ControllerType

Remarks

When you implement a PopupWindowShowAction, you may need to provide a custom Dialog Controller for the Action's pop-up Window. Use the CreateController<ControllerType> method to create this custom Dialog Controller:

private void MyPopupWindowShowAction_OnCustomizePopupWindowParams(Object sender,
      CustomizePopupWindowParamsEventArgs e) {
   //...
   e.DialogController = Application.CreateController<MyDialogController>();
}

This method creates a Controller of the specified type. If a Controller of the same type already exists, the Controller.Actions of the found Controller serve as a source for the ActionBase.Model property of the new Controller's Actions.

See Also