We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

Predefined Dialogs+MessageBox


I want to create a custom component similar to messagebox using Predefined Dialogs in syncfusion. Is it possible to help?

var res=await objComponent.Show("Body","Title",DialogType.YesNo,Icon.Info);



else if (res=DialogType.No)


5 Replies

VJ Vinitha Jeyakumar Syncfusion Team January 3, 2023 10:24 AM UTC

Hi Sarah,

We have a confirm predefined dialog box which is used to displays a specified message along with the OK and Cancel buttons, which returns a boolean value according to the user’s click action. When the user clicks the OK button, the true value is returned otherwise it will return the false value. This can be achieved by using the DialogService.ConfirmAsync method. It is used to get approval from the user, and it appears before any critical action. After get approval from the user the dialog will disappear automatically.


KA Keith A Price July 22, 2023 08:28 PM UTC

How can we change the button captions from OK/Cancel to Yes/No?

KP Kokila Poovendran Syncfusion Team July 24, 2023 07:01 AM UTC

Hi Sarah,

We apologize for any inconvenience caused. You can easily customize the button captions from "OK/Cancel" to "Yes/No" by using the "Content" property. This will allow you to personalize the buttons according to your preferences.

To help you with this customization, we have prepared a detailed documentation section. Kindly refer to the following link for more clarification:

Documentation https://blazor.syncfusion.com/documentation/predefined-dialogs/customization?cs-save-lang=1&cs-lang=razor

API Reference: 


If you have any further questions or need additional assistance, please reach out us.


Kokila Poovendran.

SA Sarah August 13, 2023 07:59 AM UTC


Thank you for your answer

How can the following image be implemented?


 src: https://blazor.syncfusion.com/demos/dialog/modal?theme=fluent

KP Kokila Poovendran Syncfusion Team August 14, 2023 02:01 PM UTC

Hi Sarah,

Greeting from Syncfusion support!


Regarding the implementation of the dialog shown in your provided image, we've carefully reviewed your request and have prepared a customized sample for your reference. In order to achieve this design, we have overridden the CSS styles for the dialog component.

You can find a screenshot of the customized dialog implementation in the attached image.


Kokila Poovendran.

Attachment: BlazorServerProject_5aa1685b.zip

Live Chat Icon For mobile
Up arrow icon