blazor-devexpress-dot-blazor-dot-dxflyout-75401069.md
Specifies whether the flyout window should be closed when a user clicks outside the window’s boundaries.
Namespace : DevExpress.Blazor
Assembly : DevExpress.Blazor.v25.2.dll
NuGet Package : DevExpress.Blazor
[DefaultValue(true)]
[Parameter]
public bool CloseOnOutsideClick { get; set; }
| Type | Default | Description |
|---|---|---|
| Boolean | true |
true to close the flyout window in response to a click outside the element; otherwise, false.
|
Users can close a flyout window in the following ways:
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