Back to Devexpress

PopupWindowShowAction.CustomizePopupWindowParams Event

expressappframework-devexpress-dot-expressapp-dot-actions-dot-popupwindowshowaction-6247e281.md

latest8.8 KB
Original Source

PopupWindowShowAction.CustomizePopupWindowParams Event

Occurs when generating a pop-up Window for a Pop-up Window Show Action.

Namespace : DevExpress.ExpressApp.Actions

Assembly : DevExpress.ExpressApp.v25.2.dll

NuGet Package : DevExpress.ExpressApp

Declaration

csharp
public event CustomizePopupWindowParamsEventHandler CustomizePopupWindowParams
vb
Public Event CustomizePopupWindowParams As CustomizePopupWindowParamsEventHandler

Event Data

The CustomizePopupWindowParams event's data class is CustomizePopupWindowParamsEventArgs. The following properties provide information specific to this event:

PropertyDescription
ActionProvides access to the Pop-up Window Show Action for which the PopupWindowShowAction.CustomizePopupWindowParams event has been raised.
ApplicationProvides access to an XafApplication object that provides methods and properties to manage the current application.
ContextSpecifies the Frame.Context of the pop-up window which is customized by a PopupWindowShowAction.CustomizePopupWindowParams event’s handler.
DialogControllerSpecifies a Dialog Controller which is activated for a Pop-up Window Show Action’s pop-up Window.
IsSizeableSpecifies whether the pop-up Window created for a Pop-up Window Show Action is sizable.
MaximizedGets or sets a value that specifies whether the window is maximized.
SizeSpecifies the size of a pop-up window.
ViewSpecifies the View that should be displayed by the Pop-up Window Show Action’s pop-up Window.

Remarks

Handle this event to specify a View for a PopupWindowShowAction to show. For this purpose, use the handler’s CustomizePopupWindowParamsEventArgs.View parameter. You can also use the CustomizePopupWindowParamsEventArgs.IsSizeable property, to specify the pop-up Window’s ability to be sizable.

The following example creates a List View and displays it via a PopupWindowShowAction.

csharp
using System;
using DevExpress.ExpressApp;
using DevExpress.ExpressApp.Actions;
using DevExpress.Persistent.Base;
using DevExpress.Persistent.BaseImpl;
// ...
public class ShowListViewController : ViewController {
    public ShowListViewController() {
        PopupWindowShowAction showListViewAction = new PopupWindowShowAction(this, "ShowListView",
            PredefinedCategory.Edit);
        showListViewAction.CustomizePopupWindowParams += ShowListViewAction_CustomizePopupWindowParams;
    }
    private void ShowListViewAction_CustomizePopupWindowParams(object sender, CustomizePopupWindowParamsEventArgs e) {
        Type objectType = typeof(Person);
        e.View = Application.CreateListView(objectType, true);
    }
}

The following code snippets (auto-collected from DevExpress Examples) contain references to the CustomizePopupWindowParams event.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

XAF_how-to-add-custom-buttons-actions-to-the-lookup-and-popup-windows/CS/EFCore/PopupActionEF/PopupActionEF.Module/Controllers/PopupListViewController.cs#L15

csharp
);
    showPopupAction.CustomizePopupWindowParams += this.showPopupAction_CustomizePopupWindowParams;
}

xaf-how-to-show-persistent-objects-in-a-non-persistent-objects-view/CS/EFCore/ComplexDialogEF/ComplexDialogEF.Module/Controllers/MyController.cs#L17

csharp
action.SelectionDependencyType = SelectionDependencyType.RequireMultipleObjects;
action.CustomizePopupWindowParams += new CustomizePopupWindowParamsEventHandler(action_CustomizePopupWindowParams);
action.Execute += new PopupWindowShowActionExecuteEventHandler(action_Execute);

xaf-how-to-implement-a-singleton-class/CS/EF/SingletonSolutionEF/SingletonSolutionEF.Module/Controllers/ShowSingletonController.cs#L19

csharp
new PopupWindowShowAction(this, "ShowSingleton", PredefinedCategory.View);
    showSingletonAction.CustomizePopupWindowParams += showSingletonAction_CustomizePopupWindowParams;
}

xaf-how-to-display-a-list-of-non-persistent-objects/CS/EFCore/NonPersistentListViewEF/NonPersistentListViewEF.Module/Controllers/ShowDuplicateBooksController.cs#L10

csharp
PopupWindowShowAction showDuplicatesAction = new PopupWindowShowAction(this, "ShowDuplicateBooks", PredefinedCategory.View);
    showDuplicatesAction.CustomizePopupWindowParams += showDuplicatesAction_CustomizePopupWindowParams;
}

xaf-save-and-share-custom-view-settings/CS/EFCore/ViewSettingsEF/ViewSettingsEF.Module/Controllers/ViewVariantsController.cs#L161

csharp
this.CreateViewVariantAction = new PopupWindowShowAction(this, "SaveAsNewViewVariant", "Edit");
this.CreateViewVariantAction.CustomizePopupWindowParams += new CustomizePopupWindowParamsEventHandler(this.CreateViewVariantAction_CustomizePopupWindowParams);
this.CreateViewVariantAction.Execute += new PopupWindowShowActionExecuteEventHandler(this.CreateViewVariantAction_Execute);

See Also

PopupWindowShowAction Class

PopupWindowShowAction Members

DevExpress.ExpressApp.Actions Namespace