Messagebox Button Text

I looked around, and it seems that everything can be edited in the MessageBox, overlay text on buttons ( WPF / C #)

MessageBox.Show("Generic Message", "Caption", MessageBoxButton.YesNoCancel, MessageBoxImage.Warning) 

Is there a way to change the text "Yes", "No", "Cancel" or do I need to write a window to work as a mailbox for this? (There is no problem with this, I'm just wondering if there is a way in WPF.)

+4
source share
2 answers

You cannot do this directly. If you have not created your own MessageBox, you can use Win32.SetWindowText() as described here (convert VB.NET code here ). If you do not want to deal with your own functions, a custom MessageBox is the best option.

+2
source

You can use any buttons offered by the MessageBoxButton enumeration. If you need something else, you need to write a special dialog.

+1
source

Source: https://habr.com/ru/post/1389680/


All Articles