Sizing problem with DataWindow/InfoBarMessageControl

Topics: Questions
Sep 24, 2012 at 2:37 PM

I ran into a sizing problem regarding the InfoBarMessageControl inside a Datawindow.

1. When the width of the DataWindow ist smaller than the size that is needed to display the standard message "The following warnings and/or errors were found..." the message is cut somewhere.
2. When you hover the mouse over the InfoBarMessageControl the warnings/errors are displayed. Texts are wrapped if they don't fit in one line.
   In case the warning/error text is larger, than the remaining height of the DataWindow the InfoBarMessageControl ist extended beyond the height of the DataWindow which doesn't look nice.

Issue 1 could be solved by adding TextWrapping="Wrap" to the Textblock belonging to the InfobarMessageControl in InfoBarMessageControl.generic.xaml.
In this case issue 2 gets even worse.

Is there any way to have the DataWindow beeing resized to fit the messages like SizeToContent="WidthAndHeight" does for the "normal" window content ?

Sep 24, 2012 at 4:57 PM

You have 2 options here:

1) Set the MinWidth yourself to a size of approx. 400

2) Disable the generation of the InfoBarMessageControl for small windows using one of the base ctors of the DataWindow.