Skip to content

Invoke PrintDialog.ShowDialog() does not show Print dialog successfully #2814

@ghost

Description

  • .NET Core Version: .NET Core SDK 5.0.100-preview.1.20106.1 + the VSIX Inserted into Dev16 16.5.0 [29803.141.master]

  • Have you experienced this same bug with .NET Framework?: No

Problem description:
Invoke PrintDialog.ShowDialog() does not show Print dialog successfully.

More Info:

  1. This is a regression issue, it's not reproducing when targeting .NET Core 3.1.
  2. This issue also cannot reproduce with Framework project.

Actual behavior:
No expected Print dialog shown.
.NET Core 5.0 screenshot:
PrintDialogIssue5 0

Expected behavior:
The Print dialog should be shown successfully.
.NET Core 3.1 screenshot:
PrintDialogIssue3 1

Minimal repro:

  1. Create a Winforms Core application.
  2. Drag and drop a button to the form.
  3. Double click the button1 to generate the button1_click event, then add following code to it:
    PrintDialog pdlg = new PrintDialog();
    pdlg.ShowDialog();
  4. Build and run.
  5. Click the button1 to see whether the Print dialog is popping up.
    PrintDialogIssue.zip

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions