Back to Devexpress

DxDropDown.Id Property

blazor-devexpress-dot-blazor-dot-dxdropdown-aec45385.md

latest1.5 KB
Original Source

DxDropDown.Id Property

Specifies the control’s unique identifier.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

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

Property Value

TypeDescription
String

The control identifier.

|

Remarks

You can use the Id property to reference the DxDropDown control from the element that triggers the drop-down window. Set the trigger element’s aria-describedby attribute to the Id property value to allow a screan reader to read window content when the trigger element is focused.

razor
<div id="dropdown-overview-target-container">
    <DxButton aria-describedby="dropDown" Click="() => IsOpen = !IsOpen">
        SHOW A DROPDOWN
    </DxButton>
</div>

<DxDropDown
    Id="dropDown"
    @bind-IsOpen="@IsOpen"
    HeaderVisible="true"
    HeaderText="Header"
    BodyText="@Constants.Content"
    Width="max(25vw, 250px)"
    PositionTarget="#dropdown-overview-target-container" />

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

See Also

DxDropDown Class

DxDropDown Members

DevExpress.Blazor Namespace