Back to Devexpress

DxToast.ChildContent Property

blazor-devexpress-dot-blazor-dot-dxtoast-85f4af12.md

latest1.8 KB
Original Source

DxToast.ChildContent Property

Specifies body content.

Namespace : DevExpress.Blazor

Assembly : DevExpress.Blazor.v25.2.dll

NuGet Package : DevExpress.Blazor

Declaration

csharp
[Parameter]
public RenderFragment ChildContent { get; set; }

Property Value

TypeDescription
RenderFragment

Content markup.

|

Remarks

The ChildContent component parameter can store custom component content that does not belong to other component’s RenderFragment properties as shown below:

razor
<DxToast @ref=toastButtons Title="Toast with buttons">
    <ChildContent>
        <DxButton CssClass="mx-2">button 1</DxButton>
        <DxButton RenderStyleMode="ButtonRenderStyleMode.Outline">button 2</DxButton>
    </ChildContent>
</DxToast>

Note

Since ChildContent contains nested markup of its parent class, the template content must conform to HTML semantics.

This property is equivalent to the Template property. You can omit both <ChildContent> and <Template> tags, and specify the markup directly in the <DxToast> tag:

razor
<DxToast @ref=toastButtons Title="Toast with buttons">
    <DxButton CssClass="mx-2">button 1</DxButton>
    <DxButton RenderStyleMode="ButtonRenderStyleMode.Outline">button 2</DxButton>
</DxToast>

See Also

DxToast Class

DxToast Members

DevExpress.Blazor Namespace