Back to Devexpress

ASPxPopupControlBase.DragElement Property

aspnet-devexpress-dot-web-dot-aspxpopupcontrolbase-780f74eb.md

latest3.1 KB
Original Source

ASPxPopupControlBase.DragElement Property

Get or sets a window’s part available for drag and drop operations.

Namespace : DevExpress.Web

Assembly : DevExpress.Web.v25.2.dll

NuGet Package : DevExpress.Web

Declaration

csharp
[DefaultValue(DragElement.Header)]
public virtual DragElement DragElement { get; set; }
vb
<DefaultValue(DragElement.Header)>
Public Overridable Property DragElement As DragElement

Property Value

TypeDefaultDescription
DragElementHeader

One of the DragElement enumeration values.

|

Available values:

NameDescription
Header

Specifies that a popup window can be moved by dragging its header.

| | Window |

Specifies that a popup window can be moved by clicking anywhere within its client area, holding down the mouse button and then moving the mouse cursor.

|

Remarks

The DragElement property specifies which part of a window can be dragged to move the window within the page. Two variants are available: header dragging (the window can be moved only by dragging its header), and window dragging (the window can be moved by clicking anywhere within its client area, holding down the mouse button and then moving the mouse cursor).

Example

This example illustrates how to customize an ASPxPopupControl’s setting container using particular properties.

aspx
<dx:ASPxButton ID="btn" runat="server" Text="Show PopUp" AutoPostBack="false">
    <ClientSideEvents Click="function (s,e) {popup.Show();}" />
</dx:ASPxButton>

<dx:ASPxPopupControl ID="ASPxPopupControl1" runat="server" ClientInstanceName="popup" PopupElementID="btn"
    DragElement="Window" HeaderText="Directed by: Ridley Scott" MaxHeight="600px"
    MaxWidth="600px" MinHeight="100px" MinWidth="210px" CloseAction="MouseOut" PopupAction="MouseOver" 
    AppearAfter="4000" DisappearAfter="4000" Top="20" Left="80" AllowResize="true" AllowDragging="true"
    ResizingMode="Postponed" SaveStateToCookies="true">
    <CloseButtonImage Url="Images/close.png" AlternateText="No image" />
    <ContentStyle ForeColor="#666677" Font-Names="Tahoma" Font-Size="10px" />
    <ContentCollection>
        <dx:PopupControlContentControl runat="server">
            <div>
                When a Roman general is betrayed and his family murdered by a corrupt prince, he
                comes to Rome as a gladiator to seek revenge.</div>
        </dx:PopupControlContentControl>
    </ContentCollection>
</dx:ASPxPopupControl>

See Also

ASPxPopupControlBase Class

ASPxPopupControlBase Members

DevExpress.Web Namespace