Skip to main content
All docs
V23.2

DxFlyout.BodyContentTemplate Property

Specifies a template for content of the flyout window’s body.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v23.2.dll

NuGet Package: DevExpress.Blazor

Declaration

[Parameter]
public RenderFragment<IPopupElementInfo> BodyContentTemplate { get; set; }

Property Value

Type Description
RenderFragment<IPopupElementInfo>

The body content.

Remarks

Use the BodyContentTemplate property to display any render fragment in the flyout body’s content area. This template does not affect the default content area rendering (that is, paddings, alignment, etc.)

The BodyContentTemplate accepts an IPopupElementInfo object as the context parameter. You can use the parameter’s CloseCallback property to implement the Close button.

<DxFlyout @bind-IsOpen=IsOpen
          PositionTarget=@($"#employee-{CurrentEmployee?.EmployeeId}")
          RestrictionTarget="#Navigation-Flyout-Customization"
          AnimationType=@Animation
          PreventCloseOnPositionTargetClick="true"
          FooterVisible="true"
          FooterCssClass="custom-flyout-footer"
          Position=@(FlyoutPosition.BottomStart | FlyoutPosition.TopStart)
          SizeMode="Params.SizeMode">
    <BodyContentTemplate>
        <div class="custom-flyout-body">
            <EmployeeCard EmployeeInfo=@CurrentEmployee CustomDetails=true/>
        </div>
    </BodyContentTemplate>
    <FooterContentTemplate>
        <div class="w-100">
            <div class="custom-flyout-footer">
                <DxTextBox NullText="Send a message" CssClass="flex-grow-1"/>
                <DxButton CssClass="popup-button" RenderStyle="ButtonRenderStyle.Primary" Text="Send" Click=@(()=> IsOpen = false)/>
            </div>
        </div>
    </FooterContentTemplate>
</DxFlyout>

Flyout Body Content Template

Run Demo: Flyout — Customization

See Also