Skip to main content

DxDropDown.StopOutsideClickPropagation Property

Specifies whether the control halts an outer click propagation.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[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