我正在使用棱鏡5,並通過NotificationRequest顯示模式對話框。我希望在OK按鈕中設置焦點,因此用戶可以按Enter鍵跳過de消息(現在它可以使用Tab - > Tab - > Enter)。我已經嘗試了很多方法,但是沒有一個工作:棱鏡通知請求專注於確定按鈕
<i:Interaction.Triggers>
<prism:InteractionRequestTrigger SourceObject="{Binding NotificationRequest, Mode=OneWay}">
<prism:PopupWindowAction IsModal="True" CenterOverAssociatedObject="True" FocusManager.FocusedElement="{Binding RelativeSource={RelativeSource FindAncestor, AncestorType={x:Type Window}}, Path=DataContext.OKButton}"/>
</prism:InteractionRequestTrigger>
</i:Interaction.Triggers>
過程中的對話是表示並沒有錯誤。唯一的問題是按鈕中的焦點。
我該如何得到這種行爲?我想要的是用戶按回車鍵,PopupWindow關閉,就好像按鈕被點擊一樣。