Back to Devexpress

ASPxPopupControlBase.AllowDragging Property

aspnet-devexpress-dot-web-dot-aspxpopupcontrolbase-f3f11272.md

latest3.1 KB
Original Source

ASPxPopupControlBase.AllowDragging Property

Specifies whether end users can drag a control’s window.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(false)]
public virtual bool AllowDragging { get; set; }
vb
<DefaultValue(False)>
Public Overridable Property AllowDragging As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true, if end users can drag a window; otherwise, false.

|

Remarks

Use the AllowDragging property to control whether end users can drag a window to another position in a web page.

Note

Example

The following example demonstrates how use the popup control’s client-side functionality to display the loading panel in a pop-up window when content is loading slowly:

View Example: How to show the loading panel when loading content

The main idea is to call the popup control’s client-side GetContentIFrame method to get the control’s IFrame. Then use the loading panel’s ShowInElement(htmlElement) method to display the panel within the IFrame. When content is loaded, hide the loading panel.

aspx
<dx:ASPxLoadingPanel ID="lp" runat="server" ClientInstanceName="lp" />
<dx:ASPxPopupControl ID="popup" runat="server" ... >
    <ClientSideEvents Init="OnPopupInit" Shown="OnPopupShown" />
</dx:ASPxPopupControl>
js
var showPopup = true;
var iframe;
function OnPopupInit (s, e) {
    iframe = popup.GetContentIFrame();
    ASPxClientUtils.AttachEventToElement(iframe, 'load', OnContentLoaded);
}

function OnPopupShown (s, e) {
    if(showPopup)
        lp.ShowInElement(iframe);
}
function OnContentLoaded (e) {
    showPopup = false;
    lp.Hide();
}

See Also

ASPxPopupControlBase Class

ASPxPopupControlBase Members

DevExpress.Web Namespace