Skip to content

PrintPreviewControl displays a black preview page after assigning an empty PrintDocument #14838

Closed

Description

@Olina-Zhang

.NET version

.NET 11 SDK build: 11.0.100-rc.1.26380.103

Did it work in .NET Framework?

Yes

Did it work in any of the earlier releases of .NET Core or .NET 5+?

Yes, regression from the PR: #14424

Issue description

After PR #14424, PrintPreviewControl.ResetForeColor() was changed to use SystemColors.ControlText as the default ForeColor. It resolves the inconsistency tracked by GH issue: #14420

But with the new default behavior in .NET 11, assigning a PrintDocument that produces no printable content causes the preview page to render as a solid black page.

Image

As a result, existing applications that preview dark-colored content may experience poor readability due to the black preview background.

Image

Steps to reproduce

  1. Create a WinForms application with targeting .NET 11.
  2. Add a PrintPreviewControl to the form.
  3. Leave its ForeColor unchanged (default value: SystemColors.ControlText).
  4. Add PrintDocument and assign it to PrintPreviewControl's Document property
  5. Run the application.

Actual Result

The preview page is rendered as a solid black page.

Expected Result

Assigning an empty PrintDocument should not cause the preview page to become black.

Activity

  1. added
    untriaged
    💥 regression-preview
    on Aug 3, 2026
  2. removed
    untriaged
    on Aug 5, 2026
  3. added a commit that references this issue on Aug 14, 2026
    c522de4
  4. Olina-Zhang commented on Aug 20, 2026

    @Olina-Zhang
    MemberAuthor

    Verified in NET 11 SDK build: rc.1.26413.103 + private dlls built from the main branch of dotnet/Winforms repo, it was fixed:

    Image
  5. added this to the 11.0-rc1 milestone on Aug 20, 2026
  6. Olina-Zhang commented on Aug 27, 2026

    @Olina-Zhang
    MemberAuthor

    Tested it in .NET 11 RC1 test pass build: 11.0.100-rc.1.26425.128, it has the same validation result as above.

  7. locked and limited conversation to collaborators on Sep 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

💥 regression-preview

Type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions