Back to Devexpress

DxPopupBase.MinWidth Property

blazor-devexpress-dot-blazor-dot-dxpopupbase-d9cb6438.md

latest2.0 KB
Original Source

DxPopupBase.MinWidth Property

Specifies the Popup’s minimum width when it adapts to fit its content.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public string MinWidth { get; set; }

Property Value

TypeDescription
String

The minimum width in CSS units.

|

Remarks

The Popup’s width is equal to 500px on desktops. On phones and tablets, the width adapts to the viewport width.

You can set the Width property to auto to make the width always fit the Popup content. Use the MinWidth and MaxWidth properties to define size constraints.

razor
<div @onclick="@(() => PopupVisible = true)">
    <p>CLICK TO SHOW A POP-UP WINDOW</p>
</div>

<DxPopup @bind-Visible="@PopupVisible"
         HeaderText="Header"
         BodyText="@DynamicText"
         Width="auto"
         MinWidth="300px"
         MaxWidth="600px" />

@code {
    bool PopupVisible { get; set; } = false;
    string DynamicText { get; set; } // Get text from an external source.
}

You can also use the Width property to specify the width in absolute or relative units.

To change the Popup’s height, use the Height, MinHeight, and MaxHeight properties.

See Also

DxPopupBase Class

DxPopupBase Members

DevExpress.Blazor Namespace