How to set the text resource and size of ThemedMessageBox?

SyntaxEditor for WPF Forum

Posted 2 years ago by Sunshine - Appeon
Version: 22.1.1

Can the button text on ThemedMessageBox be set, because we have to do some international translations.

And whether we can set its maximum size, sometimes the content of the prompt information is too long, which will cause the prompt box to fill the entire screen.

Comments (1)

Posted 2 years ago by Actipro Software Support - Cleveland, OH, USA

Great questions.

Yes, the button text can be customized. Please refer to the following topic that lists the available string resources used for buttons and how to change them.

There is currently not a way to set a maximum size for ThemedMessageBox directly. Ultimately, ThemedMessageBox is just a wrapper around UserPrompt and UserPromptWindow. It just configures UserPrompt in a way that is consistent with native MessageBox and provides a convenient binary compatible API with native MessageBox to allow code to easily transition. For more control over the resulting dialogs, you could write your own wrapper that configures and displays a UserPrompt.

If you can wait for the next maintenance release, we have improved handling of large text so that the width automatically increases in logical steps until it is wide enough to display the content on the screen without exceeding the available height. This is similar to how the native MessageBox behaves.  If still too tall at the maximum width, a vertical scrollbar will be used for the content to avoid making the window too large (something the native MessageBox does not do).

Thank you for bringing the width issue to our attention.

Actipro Software Support

The latest build of this product (v24.1.2) was released 0 days ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.