Skip to main content
Tab

ASPxPopupControlBase.ShowCloseButton Property

Gets or sets a value that specifies whether a window’s close button is displayed.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v24.1.dll

NuGet Package: DevExpress.Web

Declaration

[DefaultValue(true)]
public bool ShowCloseButton { get; set; }

Property Value

Type Default Description
Boolean true

true if a window’s close button is displayed; otherwise, false.

Remarks

Note

For ASPxPopupControl only:

If the ASPxPopupControl.Windows collection is empty, the ShowCloseButton property is applied to the default popup window. Otherwise, the ShowCloseButton property specifies the close button visibility for all popup windows from the ASPxPopupControl.Windows collection.

Example

The ASPxPopupControl does not allow a developer to prevent a PopupControl from being hidden when the CloseButton is clicked based on a custom criteria. A possible solution for this limitation is to use templates. You should add a button to the PopupControl's HeaderTemplate container and decide whether a PopupControl should be closed or not when this button is clicked.

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class MasterPage : System.Web.UI.MasterPage
{
    protected void Page_Load(object sender, EventArgs e) {

    }
}
See Also