The requested page is not available for the requested platform. You are viewing the content for Default platform.

ModuleBase.GetStartupActions() Method

Returns a list of Pop-up Window Show Actions that must be executed before loading the application's main Window.

Namespace: DevExpress.ExpressApp

Assembly: DevExpress.ExpressApp.v19.1.dll

Declaration

public virtual IList<PopupWindowShowAction> GetStartupActions()
Public Overridable Function GetStartupActions As IList(Of PopupWindowShowAction)

Returns

Type Description
IList<PopupWindowShowAction>

An IList<PopupWindowShowAction> object that represents a collection of Actions to be executed before invoking the application's main Window.

Remarks

Override this method to return a custom list of Pop-up Window Show Actions to be executed when the application is starting up. In the following example, an Action that shows the BusinessObject1 List View is added.

using DevExpress.ExpressApp.Actions;
// ...
public override IList<PopupWindowShowAction> GetStartupActions() {
    List<PopupWindowShowAction> actions = new List<PopupWindowShowAction>(base.GetStartupActions());
    IObjectSpace objectSpace = Application.CreateObjectSpace(typeof(BusinessObject1));
    PopupWindowShowAction startupAction = new PopupWindowShowAction();
    startupAction.CustomizePopupWindowParams += 
        delegate(Object sender, CustomizePopupWindowParamsEventArgs e) {
        e.View = Application.CreateListView(objectSpace, typeof(BusinessObject1), true);
    };
    actions.Add(startupAction);
    return actions;
}

If your XAF WinForms application uses the Security System and requires users to log in, the Overlay Form covers the Logon Form after the user clicks the Log In button and until the Main Window loads. If any startup Actions are available, the Actions show forms while the Logon Form and the Overlay Form are displayed.

You can close the Logon Form after the user clicks Log In and then perform startup Actions. To do this, access the WinForms Application project's WinApplication.cs (WinApplication.vb) file and set the ExecuteStartupLogicBeforeClosingLogonWindow property to false:

namespace MySolution.Win {
    public partial class MySolutionWindowsFormsApplication : WinApplication {
        // ...
        private void InitializeDefaults() {  
            // ...
            ExecuteStartupLogicBeforeClosingLogonWindow = false;
        }
        // ...
    }
}

To disable the Overlay Form, you can deactivate all built-in splash forms or use a constructor that does not enable the Overlay Form.

See Also