Skip to main content

DxWindow.PositionX Property

Specifies the X coordinate of the Window’s top left corner.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public int? PositionX { get; set; }

Property Value

Type Description
Nullable<Int32>

The X coordinate of the Window’s top left corner.

Remarks

Use the PositionX and PositionY properties to specify the Window position.

<DxButton RenderStyle="ButtonRenderStyle.Secondary" 
          Click="() => WindowVisible = !WindowVisible">SHOW A WINDOW</DxButton>
<DxWindow @bind-Visible=WindowVisible
          PositionX="positionX"
          PositionY="positionY"
          HeaderText="Header"
          BodyText="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Mauris sit amet metus vel
             nisi blandit tincidunt vel efficitur purus. Nunc nec turpis tempus, accumsan orci auctor,
             imperdiet mauris. Fusce id purus magna."
          Width="max(25vw, 250px)">
</DxWindow>

@code {
    int positionX = 250, positionY = 250;
    bool WindowVisible;
}

If the AllowDrag property is set to true, users can drag the Window to a new position.

Run Demo: Window - Dragging

See Also