Skip to main content
All docs
V25.1
  • DxFlyout.CloseOnOutsideClick Property

    Specifies whether the flyout window should be closed when a user clicks outside the window’s boundaries.

    Namespace: DevExpress.Blazor

    Assembly: DevExpress.Blazor.v25.1.dll

    NuGet Package: DevExpress.Blazor

    Declaration

    [DefaultValue(true)]
    [Parameter]
    public bool CloseOnOutsideClick { get; set; }

    Property Value

    Type Default Description
    Boolean true

    true to close the flyout window in response to a click outside the element; otherwise, false.

    Remarks

    Users can close a flyout window in the following ways:

    • Press Escape.
    • Click outside the window’s boundaries.

    Set the CloseOnOutsideClick property to false to keep the flyout window open in response to a click outside the element.

    <DxButton Id="showFlyout" Click="() => IsOpenFlyout = true">Show a flyout window</DxButton>
    <DxFlyout @bind-IsOpen="@IsOpenFlyout"
                PositionTarget="#showFlyout"
                Position="FlyoutPosition.Bottom"
                CloseOnOutsideClick="false"
                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"
                FooterVisible="true">
        <FooterContentTemplate>
            @* In a template, you can use the context.CloseCallback property 
               to implement a custom close action. *@
            <DxButton Text="OK" Click="@context.CloseCallback" />
        </FooterContentTemplate>
    </DxFlyout>
    
    @code {
        bool IsOpenFlyout { get; set; } = false;
    }
    

    See Also