Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

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

C#
[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.

Razor
<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