winforms
winforms copied to clipboard
Hiding TabStop property of PrintPreviewControl from Designer and setting the default value as false.
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
After
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.