Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The default Print UI dialogue is not shown on the Windows platform when the EntryPoint is set as "Windows.PartialTrustApplication" in Package.appxmanifest. #4440

Open
deepika134 opened this issue May 7, 2024 · 7 comments
Labels

Comments

@deepika134
Copy link

deepika134 commented May 7, 2024

Describe the bug

The default Print UI dialogue is not shown on the Windows platform when the EntryPoint is set as "Windows.PartialTrustApplication" in Package.appxmanifest.

Steps to reproduce the bug

  1. Run the attached sample on a machine with a Windows platform.
  2. Click the button to execute the associated functionality to open the default print dialogue of the Windows platform.
  3. Observe that the application does not show the Print preview dialogue.

App1.zip

Expected behavior

When the EntryPoint is set as "$targetentrypoint$" in Package.appxmanifest, it displays the default Print UI dialogue correctly in the Windows platform. However, when the EntryPoint is changed to "Windows.PartialTrustApplication" in Package.appxmanifest, the print dialogue is not shown. The print dialogue should be displayed properly.

Screenshots

No response

NuGet package version

None

Windows version

Windows 10

Additional context

No response

@deepika134 deepika134 added the bug Something isn't working label May 7, 2024
Copy link

github-actions bot commented May 7, 2024

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@DarranRowe
Copy link

Just to be sure, are you using PrintManager?

If so, I wonder if this is a variation of the pickers problem. There is a long running problem where certain UI elements in the UWP namespaces will not accept a HWND if the application is running in an AppContainer. Does IPrintManagerInterop::GetForWindow succeed? (PrintManagerInterop for C#) This should give an instance of PrintManager in applications running outside of an AppContainer and likely just throw with an access denied error when the application is running in the AppContainer.

@deepika134
Copy link
Author

@DarranRowe ,

Yes , I am using the PrintManager .

PrintManager **Does IPrintManagerInterop::GetForWindow succeed?** Yes it works , when set the EntryPoint is set as "$targetentrypoint$" in Package.appxmanifest, it displays the default Print UI dialogue properly in the Windows platform. we are facing the issue , when the EntryPoint is changed to "Windows.PartialTrustApplication" in Package.appxmanifest, the print dialogue is not shown.

@deepika134
Copy link
Author

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!

Open similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

The issue mentioned is different from the issue now being reported.

@DarranRowe
Copy link

@deepika134

This would be better reported in the Feedback Hub. There are two reasons for this.

  1. Everything relevant here is a Windows component. Anything under the Windows root namespace is built in to Windows. PrintManager's fully qualified name is Windows.Graphics.Printing.PrintManager. Also, application packaging is also a feature provided by Windows.
  2. If you were to use PrintManager in a desktop application using any other UI framework/library, then the exact same thing would happen if you package the application. You can test this yourself.

I won't lie though, Microsoft has been really unresponsive on these issues. I wrote the report for the file pickers in the Feedback Hub over a year ago, and nothing has really changed. This issue has been known for longer.

@codendone
Copy link
Contributor

Possibly the same issue as #3293.

@deepika134
Copy link
Author

@codendone - Both are not the same issue.

@codendone codendone transferred this issue from microsoft/microsoft-ui-xaml May 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants