我已经成功地实现了自定义弹出窗口,通过使用这个指南的棱镜交互功能。
<i:Interaction.Triggers>
<prism:InteractionRequestTrigger SourceObject="{Binding CustomPopupViewRequest, Mode=OneWay}">
<prism:PopupWindowAction>
<prism:PopupWindowAction.WindowContent>
<local:PurchasePaymentInfoView />
</prism:PopupWindowAction.WindowContent>
</prism:PopupWindowAction>
</prism:InteractionRequestTrigger>
</i:Interaction.Triggers>但是弹出窗口显示在屏幕上的任意位置。我想将这个弹出窗口的WindowStartupLocation定义为CenterScreen。
发布于 2016-03-28 15:26:06
如果使用的是最新的预发布版本,则可以使用WindowStartupLocation属性。
如果没有,并且使用当前的CenterOverAssociatedObject属性将不能满足您的需要:
然后,您必须创建自己的PopupWindowAction。
https://stackoverflow.com/questions/36264174
复制相似问题