我正在尝试在显示PrintManager时显示内容对话框。我尝试了以下代码,但窗口显示在PrintManager后面,只有在PrintManager关闭后才能访问。
以下是代码:
Await printDocument.Dispatcher.RunAsync(Windows.UI.Core.CoreDispatcherPriority.Normal, Async Sub()
If dlgPrint Is Nothing Then dlgPrint = New dlgPrint
dlgPrint.value = sender.Options("CustomSize").Value
dlgPrint.pictures = NumberOfPhotos
Dim a As IAsyncOperation(Of ContentDialogResult) = dlgPrint.ShowAsync
dlgPrint.Focus(FocusState.Programmatic)
Dim res As ContentDialogResult = Await (a)
If res = ContentDialogResult.Secondary Then
sender.Options("CustomSize").TrySetValue(dlgPrint.value)
End If
End Sub)