.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.
As a result, existing applications that preview dark-colored content may experience poor readability due to the black preview background.
Steps to reproduce
- Create a WinForms application with targeting .NET 11.
- Add a PrintPreviewControl to the form.
- Leave its ForeColor unchanged (default value: SystemColors.ControlText).
- Add PrintDocument and assign it to PrintPreviewControl's Document property
- 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.
.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 useSystemColors.ControlTextas the defaultForeColor. It resolves the inconsistency tracked by GH issue: #14420But with the new default behavior in .NET 11, assigning a
PrintDocumentthat produces no printable content causes the preview page to render as a solid black page.As a result, existing applications that preview dark-colored content may experience poor readability due to the black preview background.
Steps to reproduce
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.