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

DxDropDown.StopOutsideClickPropagation Property

Specifies whether the control halts an outer click propagation.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v24.2.dll

NuGet Package: DevExpress.Blazor

#Declaration

C#
[Parameter]
public bool StopOutsideClickPropagation { get; set; }

#Property Value

Type Default Description
Boolean `false`

true to stop outer click propagation; otherwise, false.

#Remarks

When a user clicks outside a drop-down window, the control closes the window and processes subsequent events (for instance, a button click). Set the StopOutsideClickPropagation property to true to prevent further propagation of the click event after the window is closed.

<DxButton Id="showDDbtton" Click="() => IsOpenWindow = true">Show Window</DxButton>
<DxDropDown BodyText="Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor
            incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud
            exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat."
            Width="400"
            @bind-IsOpen="@IsOpenWindow"
            PositionTarget="#showDDbtton"
            PositionMode="DropDownPositionMode.Bottom"
            StopOutsideClickPropagation="true">
</DxDropDown>

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

If the CloseOnOutsideClick property is set to false, the StopOutsideClickPropagation property has no effect.

See Also