I have a problem with Prism / WPF custom interaction request popups. The popup renders correctly on first request, but each subsequent popup reuses the same view. This results in TextBlock
controls concatenating text, scroll bars not being visible, dynamic data in ItemsControl
items not being visible, the popup window having wrong size, etc. Is it possible to force creation of new popup window with each new interaction request or refresh all controls in the popup?
To show popup I am using standard code from PRISM documentation, for example the popup is instantiated as:
PopUpViewModel displayData = reportCreator.GetReport();
this.CustomConfirmationRequest.Raise(displayData, res => {
if (res.Confirmed)
{ ... }
});
where PopUpViewModel
inherits Confirmation, IInteractionRequestAware
XAML is:
<prism:InteractionRequestTrigger SourceObject="{Binding CustomConfirmationRequest, Mode=OneWay}">
<prism:PopupWindowAction IsModal="True" CenterOverAssociatedObject="True" WindowStartupLocation="CenterScreen" >
<prism:PopupWindowAction.WindowContent>
<popups:SoPopUp/>
</prism:PopupWindowAction.WindowContent>
</prism:PopupWindowAction>
</prism:InteractionRequestTrigger>