Skip to main content
All docs
V24.2

DxDropDown.SizeMode Property

Specifies the size of the component and its content.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[DefaultValue(null)]
[Parameter]
public SizeMode? SizeMode { get; set; }

Property Value

Type Default Description
Nullable<SizeMode> null

The size mode. If the property is not specified (the value is null), the size is determined by the SizeMode global option.

Available values:

Name Description
Small

Small size.

Medium

Medium size.

Large

Large size.

Remarks

The SizeMode property allows you to apply different size modes to the DxDropDown component and its content. For more information, refer to the following topic: Size Modes.

DxDropDown in different size modes

The following code snippet applies the Large size mode to the DxDropDown component.

<div id="dropdown-customization-target-container">
    <DxButton
        Click="() => IsOpen = !IsOpen"
        RenderStyle="@ButtonRenderStyle.Secondary"
        aria-describedby="dropDown-customization">SHOW A DROPDOWN</DxButton>
</div>
<DxDropDown
    @bind-IsOpen="@IsOpen"
    Id="dropDown-customization"
    PositionTarget="#dropdown-customization-target-container"
    RestrictionTarget="#Navigation-DropDown-Customization"
    HeaderVisible="true"
    HeaderText="Edit Contact"
    FooterVisible="true"
    SizeMode="SizeMode.Large">
    <BodyContentTemplate>
        <SampleEditForm/>
    </BodyContentTemplate>
    <FooterContentTemplate>
        <DxButton RenderStyle="ButtonRenderStyle.Primary" Text="OK" Click="@context.CloseCallback"/>
        <DxButton RenderStyle="ButtonRenderStyle.Secondary" Text="Cancel" Click="@context.CloseCallback"/>
    </FooterContentTemplate>
</DxDropDown>

@code {
    bool IsOpen { get; set; } = false;
}

Run Demo: DropDown - Customization

See Also