Sometimes the text of notification message for modal dialog is very long as you can see on the figure below.This is not custom modal dialog but simple notification modal dialog which has a very long text mesage. This is the exception error-message produced by MODBUS protocol library that I use in my application. But SQL Server exceptions can also have such very long text messages about errors. By default, Prism 6.2 modal notification dialod displays a none-wrapped text. As a result of it, the modal dialog is very long and not all of the text of error-message is placed and displayed in the dialog. Below is the XAML markup for this modal dialog:
<prism:InteractionRequestTrigger SourceObject="{Binding NotificationRequest, Mode=OneWay}">
<prism:PopupWindowAction IsModal="True" CenterOverAssociatedObject="True"/>
</prism:InteractionRequestTrigger>
And below is View Model C#-code for this dialog:
public InteractionRequest<INotification> NotificationRequest { get; private set; }
public String NotificationStatus
{
get { return this._notificationStatus; }
set { SetProperty(ref this._notificationStatus, value); }
}
The folowing line of code is from View Modal constructor:
this.NotificationRequest = new InteractionRequest<INotification>();
And the following is method displaying modal notification dialog:
private void raiseNotification(string message, string caption)
{
this.NotificationRequest.Raise(
new Notification { Content = message, Title = caption },
n => { this.NotificationStatus = "The user was notified."; });
}
Can I set text-wrapping mode for a long-text mesage (in XAML or in View Model) to transfer the text to the next lines in Prism 6.2. modal dialog?