Library Blazor Components Dialog Reference Classes Dialog OnButtonClick

OnButtonClick

An event that is trigger after an user click on one of the buttons.

razor
[Parameter]
public EventCallback<DialogButton> OnButtonClick { get; set; }

Examples

razor
<Dialog Buttons="DialogButton.Ok | DialogButton.Close" OnButtonClick="HandleButtonClick">
</Dialog>

@code {
    private void HandleButtonClick(DialogButton dialogButton)
    {
        if (dialogButton == DialogButton.Ok)
        {
            
        }
    }
}

Sign in