Class DialogTemplates
A class used in the SfDialog to configure templates to display within a header, content, and footer section of Dialog.
Inheritance
Namespace: Syncfusion.Blazor.Popups
Assembly: Syncfusion.Blazor.dll
Syntax
public class DialogTemplates : OwningComponentBase
Examples
@using Syncfusion.Blazor.Popups
<SfDialog Width="500px" @bind-Visible="Visibility">
<DialogTemplates>
<Header><h1>Dialog Heade</h1></Header>
<Content>
<p>
Dialog content
</p>
</Content>
<FooterTemplate>
<button class="e-btn" style="background-color:#8A2BE2;" onclick="@OnBtnClick">OK</button>
</FooterTemplate>
</DialogTemplates>
</SfDialog>
@code {
private bool Visibility { get; set; } = true;
private void OnBtnClick()
{
this.Visibility = false;
}
}
Constructors
DialogTemplates()
Declaration
public DialogTemplates()
Properties
Content
Gets or sets template as Microsoft.AspNetCore.Components.RenderFragment that defines the custom appearance of content area.
Declaration
public RenderFragment Content { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment | A template content that specifies the visualization of dialog content area. The default value in |
Remarks
The Content
is used to define the appearance of the dialog content area. Specify Content within DialogTemplates tag directive.
Examples
@using Syncfusion.Blazor.Popups
<SfDialog Width="500px" @bind-Visible="Visibility">
<DialogTemplates>
<Content>
<p>
Dialog content
</p>
</Content>
</DialogTemplates>
</SfDialog>
@code {
private bool Visibility { get; set; } = true;
}
FooterTemplate
Gets or sets template as Microsoft.AspNetCore.Components.RenderFragment that defines the custom appearance of footer area.
Declaration
public RenderFragment FooterTemplate { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment | The action buttons are enabled by default in the footer. The default value is |
Remarks
The FooterTemplate
is used to define the appearance of the dialog footer area. Specify FooterTemplate within DialogTemplates tag directive.
Examples
@using Syncfusion.Blazor.Popups
<SfDialog Width="500px" @bind-Visible="Visibility">
<DialogTemplates>
<Content>
<p>
Dialog content
</p>
</Content>
<FooterTemplate>
<button class="e-btn" style="background-color:#8A2BE2;" onclick="@OnBtnClick">OK</button>
</FooterTemplate>
</DialogTemplates>
</SfDialog>
@code {
private bool Visibility { get; set; } = true;
private void OnBtnClick()
{
this.Visibility = false;
}
}
Header
Gets or sets template as Microsoft.AspNetCore.Components.RenderFragment that defines the custom appearance of title area.
Declaration
public RenderFragment Header { get; set; }
Property Value
Type | Description |
---|---|
Microsoft.AspNetCore.Components.RenderFragment | A template content that specifies the visualization of dialog title area. The default value in |
Remarks
The Header
is used to define the appearance of the dialog title area. Specify Header within DialogTemplates tag directive.
Examples
@using Syncfusion.Blazor.Popups
<SfDialog Width="500px" @bind-Visible="Visibility">
<DialogTemplates>
<Header><h1>Dialog Heade</h1></Header>
<Content>
<p>
Dialog content
</p>
</Content>
</DialogTemplates>
</SfDialog>
@code {
private bool Visibility { get; set; } = true;
}
Methods
Dispose()
Dispose the unmanaged resources.
Declaration
public virtual void Dispose()
Dispose(Boolean)
Dispose the unmanaged resources.
Declaration
protected override void Dispose(bool disposing)
Parameters
Type | Name | Description |
---|---|---|
System.Boolean | disposing | Boolean value to dispose the object. |
OnInitialized()
Method invoked when the component is ready to start.
Declaration
protected override void OnInitialized()