MessageBox

2349
2
10-12-2016 02:01 PM
HoriaTudosie
Occasional Contributor II

I cannot get right functionality in ArcGIS Pro for a MessageBox.

I'm using:

using MessageBox = ArcGIS.Desktop.Framework.Dialogs.MessageBox;

but this is what I get:

Issues:

1.The icon is vertically center-aligned - should be top! in this screen, I can see only half of it.

2. There is no scroll bar and the message box cannot be resized.

3. Content cannot be highlighted and/or copied to the Clipboard.

4. (Title is center-aligned instead of left-aligned.)

I could use the System.Windows.Forms.MessageBox instead, but this one is not modal and usually ends up under the main ArcGIS Pro window!

Is there another name space containing MessageBox more suitable for ArcGIS Pro?
(Is it such namespace suitable also for various dialogs?)

Tags (2)
2 Replies
Wolf
by Esri Regular Contributor
Esri Regular Contributor

Hi Horia,

 It looks like the designer of the Pro Framework's message box didn't take large amounts of text into account.  We will have the dev team take a look at that.  However, I have a solution in regards to your item 3)
3. Content cannot be highlighted and/or copied to the clipboard
If your messagebox window has system focus, you can use the Ctrl+C (copy command) to copy the content of the message box to the clipboard.  It appears that all text on the messagebox (even if it's clipped by the display) is copied to the clipboard.  This is the same feature that exists in the Window's system message box control.

HoriaTudosie
Occasional Contributor II

How can I change the layout (template) of the [InternalMessageBox]?

I can play with the Live Visual Tree and get the appropriate behavior and style.
But how can I add that in the code?

For example, from this:

I want to make this:

0 Kudos