Class DialogButtons
Represents a collection of DialogButton components that are rendered within the SfDialog component.
Implements
System.IAsyncDisposable
Inherited Members
Namespace: Syncfusion.Blazor.Toolkit.Popups
Assembly: Syncfusion.Blazor.Toolkit.dll
Syntax
public class DialogButtons : SfBaseComponent, IAsyncDisposable
Remarks
The DialogButtons component serves as a container for multiple DialogButton instances within a dialog.
To generate dynamic DialogButton instances based on a collection, use @foreach within the DialogButtons tag directive.
Each button in the collection can be configured with different properties such as content, click handlers, and styling options.
Examples
In the following code example, a basic dialog with buttons has been rendered using the tag directive.
@using Syncfusion.Blazor.Toolkit.Popups
<SfDialog Width="500px" @bind-Visible="Visibility">
<DialogTemplates>
<Content>
<p>
Dialog content
</p>
</Content>
</DialogTemplates>
<DialogButtons>
<DialogButton IsPrimary="true" Content="Ok" OnClick="@OnBtnClick" />
<DialogButton Content="Cancel" OnClick="@OnBtnClick" />
</DialogButtons>
</SfDialog>
@code {
private bool Visibility { get; set; } = true;
private void OnBtnClick()
{
this.Visibility = false;
}
}
Constructors
DialogButtons()
Declaration
public DialogButtons()
Methods
BuildRenderTree(RenderTreeBuilder)
Declaration
protected override void BuildRenderTree(RenderTreeBuilder __builder)
Parameters
| Type | Name | Description |
|---|---|---|
| Microsoft.AspNetCore.Components.Rendering.RenderTreeBuilder | __builder |
Implements
System.IAsyncDisposable