winforms icon indicating copy to clipboard operation
winforms copied to clipboard

Hiding TabStop property of PrintPreviewControl from Designer and setting the default value as false.

Open NikitaSemenovAkvelon opened this issue 2 years ago • 0 comments

Fixes #3678

Proposed changes

  • Set the default value of TabStop to false.
  • Hided TabStop property from Designer.

Customer Impact

  • Developer won't see the TabStop property in Property view by designer.
  • User won't tab to PrintPreviewControl.

Regression?

  • No

Risk

  • Minimal.

Screenshots

Before

image image

After

MicrosoftTeams-image MicrosoftTeams-image (1)

Test methodology

  • Manually via VS and WinForms app.

Test environment(s)

  • .NET 6.0.7

The suggested change in #3678 didn't fix the behavior. DefaultValueAttribute responsible for will be a property set explicitly in Form.Designer.cs or not. I'd looked for how it works in Label and copied a fix from them. Also, the fix covered case 2 from the issue, because it became unreachable. But if you are strongly sure that we need to add borders, it won't be done easily. Now there is no PrintPreviewControlRenderer class and drawing is processed inside Control.WmPaint(ref Message m) when control draws the first time or resource inside is changed.

Microsoft Reviewers: Open in CodeFlow

NikitaSemenovAkvelon avatar Aug 03 '22 10:08 NikitaSemenovAkvelon