Skip to main content
A newer version of this page is available. .

DxFlyout.BodyTemplate Property

Specifies a template for the flyout window’s body.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.1.dll

NuGet Package: DevExpress.Blazor

Declaration

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

Property Value

Type Description
RenderFragment<IPopupElementInfo>

The template content.

Remarks

Use the BodyTemplate property to display any UI fragment (for instance, formatted text, images, or another component) in the body element of the Flyout component. The template has the context parameter. You can use the parameter’s CloseCallback property to implement the Close button.

The BodyTemplate property takes priority over the BodyText and BodyTextTemplate properties.

Run Demo: Flyout — Customization

<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)>
    <BodyTemplate>
        <div class="custom-flyout-body">
            <EmployeeCard EmployeeInfo=@CurrentEmployee CustomDetails=true/>
        </div>
    </BodyTemplate>
    <FooterTextTemplate>
        <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>
    </FooterTextTemplate>
</DxFlyout>

Flyout Body Template

See Also