PopupContentLoadMode Enum
Lists values that specify when DxPopupBase, DxWindow, DxFlyout, and DxDropDown components load their content.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v25.1.dll
NuGet Package: DevExpress.Blazor
Declaration
public enum PopupContentLoadMode
Members
Name | Description |
---|---|
OnEveryShow
|
The component re-renders its content into the DOM when the popup window opens and removes it from the DOM when the popup closes. |
OnComponentLoad
|
The component renders its content into the DOM on initial page load. This content remains in the DOM regardless of popup visibility. |
OnFirstShow
|
The component renders its content into the DOM when the popup window first opens. This content remains in the DOM after the popup is closed. |
Related API Members
The following properties accept/return PopupContentLoadMode values:
Remarks
These options allow you to balance initial load time, memory consumption, and performance to best suit your specific scenario:
OnEveryShow
- Minimizes the DOM footprint when the popup is hidden but adds a small render delay each time the popup opens. Recommended for displaying real-time data, notifications, context help, or when the same popup is reused to display different data based on context.
OnComponentLoad
- Ensures the fastest possible popup window display. Slightly increases page load time and adds permanent complexity to the DOM, even if the popup is never used. Recommended for popups that must be displayed immediately on page load, like login forms, consent requests, age gates, and important announcements. This option can also be used to preload data from third-party resources.
OnFirstShow
- Balances initial page load performance, responsiveness, and resource consumption at the expense of a small render delay the first time the popup is displayed. Recommended for most scenarios, such as settings dialogs, detail view popups, and license notifications.
<DxPopup @bind-Visible="PopupVisible"
HeaderText="We value your privacy"
ContentLoadMode="PopupContentLoadMode.OnComponentLoad">
<p>We use cookies to enhance your browsing experience.
By clicking "Accept all", you consent to our use of cookies.</p>
<DxButton Text="Accept all" />
</DxPopup>
@code {
bool PopupVisible { get; set; } = false;
protected override void OnInitialized() {
PopupVisible = true;
}
}