DxFlyout.HeaderContentTemplate Property
Specifies a template for content of the flyout window’s header.
Namespace: DevExpress.Blazor
Assembly: DevExpress.Blazor.v24.1.dll
NuGet Package: DevExpress.Blazor
Declaration
[Parameter]
public RenderFragment<IPopupElementInfo> HeaderContentTemplate { get; set; }
Property Value
Type | Description |
---|---|
RenderFragment<IPopupElementInfo> | The header content. |
Remarks
Use the HeaderContentTemplate
property to display any UI render fragment in the flyout window header’s content area. This template does not affect the default content area rendering (that is, paddings, alignment, etc.)
The HeaderContentTemplate
accepts an IPopupElementInfo object as the context
parameter. You can use the parameter’s CloseCallback property to implement the Close button.
<DxButton RenderStyle="ButtonRenderStyle.Secondary" Click="() => IsOpen = !IsOpen" Id="flyout-overview-target-container">SHOW A FLYOUT</DxButton>
<DxFlyout @bind-IsOpen=IsOpen
PositionTarget="#flyout-overview-target-container"
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="max(25vw, 250px)"
HeaderVisible="true">
<HeaderContentTemplate>
<div class="header-style">
<DxButton Text="X" Click="@context.CloseCallback" />
</div>
</HeaderContentTemplate>
</DxFlyout>
@code {
bool IsOpen { get; set; } = false;
}
See Also