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

Hi,

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);

if(res==DialogType.Yes)

...

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.



Regards,
Vinitha




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: 

https://help.syncfusion.com/cr/blazor/Syncfusion.Blazor.Popups.DialogButtonOptions.html#Syncfusion_Blazor_Popups_DialogButtonOptions_Content 


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


R
egards,

Kokila Poovendran.



SA Sarah August 13, 2023 07:59 AM UTC

Hi,

Thank you for your answer

How can the following image be implemented?


Image_4479_1691913469941


 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.





Regards,

Kokila Poovendran.


Attachment: BlazorServerProject_5aa1685b.zip

Loader.
Live Chat Icon For mobile
Up arrow icon