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

DxFlyout.BodyTextTemplate Property

Specifies a template for the flyout window’s body text area.

Namespace: DevExpress.Blazor

Assembly: DevExpress.Blazor.v22.2.dll

NuGet Package: DevExpress.Blazor

Declaration

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

Property Value

Type Description
RenderFragment<IPopupElementInfo>

The template content.

Remarks

Use the BodyTextTemplate property to display any UI fragment (for instance, formatted text, images, or another component) in the window’s text area. The template accepts an IPopupElementInfo object as the context parameter. You can use the parameter’s CloseCallback property to implement the Close button.

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)
          SizeMode="Params.SizeMode">
    <BodyTextTemplate>
        <div class="custom-flyout-body">
            <EmployeeCard EmployeeInfo=@CurrentEmployee CustomDetails=true/>
        </div>
    </BodyTextTemplate>
    <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