dotnet / dotnet/docs-desktop

[epic] WinForms Developing User Controls - Move and port content

Open
#1,070 2 comments 0 reactions 1 assignee Claimed by @adegeo View on GitHub
doc-idea dotnet-desktop/svc Pri1 winforms/subsvc
Dominant language
C#
Stars
237
Forks
191
Avg merge
4d 16h
Merged PRs (30d)
3

Description

Related to #72

When porting and migrating source content (presented as a [link]() that goes to an article), open the source material up. Find out where it exists in the TOC. In the source project #72 navigate down to the **.NET Framework 4 TOC and my notes** collapsible region and expand it. Find the article title in the TOC and review the notes.

### Tasks

- [x] Header crafted for .NET Framework control designer content. Explain that this content was written for .NET Framework and may not apply to .NET. Link to this content's overview.
- [x] Apply header to archived VS 2011 content (linked to by the API docs)

### Supplemental

Relevant blog posts:

- WinForms Designer for .NET general overview and motivation of the rewrite
[State of the Windows Forms Designer for .NET Applications](https://devblogs.microsoft.com/dotnet/state-of-the-windows-forms-designer-for-net-applications/)

- Databinding with the OOP-Designer

- Note, that the Data Source Provider Service are not available in .NET (Core) scenarios. That means, that we also don’t have the Data Sources Window, which allows to drag elements on the Form, which then get automatically prepared for binding.
[Databinding with the OOP Windows Forms Designer - .NET Blog](https://devblogs.microsoft.com/dotnet/databinding-with-the-oop-windows-forms-designer/)

- This one is for MVVM in WinForms. It would be cool to teach SEO MVVM and WinForms, so if people look for it, they wouldn’t find 10 year old Stack-overflow-workarounds.
[Using Command Binding in Windows Forms apps to go Cross-Platform - .NET Blog](https://devblogs.microsoft.com/dotnet/winforms-cross-platform-dotnet-maui-command-binding/)

- User Controls in the new Designer:
- The blog post does only do a semi-good job I think for the really easy scenarios. Contact @KlausLoeffelmann if we need to come-up with something easy for introduction.
[Custom Controls for WinForm's Out-Of-Process Designer - .NET Blog](https://devblogs.microsoft.com/dotnet/custom-controls-for-winforms-out-of-process-designer/)

- For VB, maybe add some info boxes to the existing articles for the Application Framework articles, and link them to this Blog Post, which summarizes the changes. The links to those docs are in the blog post (so those would just need a back-link to the post):
[What's new for the WinForms Visual Basic Application Framework - .NET Blog](https://devblogs.microsoft.com/dotnet/update-to-winforms-vb-appframework/)

- Review email for more information...

- https://github.com/dotnet/winforms/issues/8873

### Proposed TOC

- [ ] Develop controls\
Custom designers for .NET require new namespace and type #41
- [x] Overview ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/varieties-of-custom-controls?view=netframeworkdesktop-4.8) [link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/control-type-recommendations?view=netframeworkdesktop-4.8) [link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/windows-forms-control-development-basics?view=netframeworkdesktop-4.8))
- [x] Design guidelines ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/property-changed-events?view=netframeworkdesktop-4.8) [link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/defining-an-event-in-windows-forms-controls?view=netframeworkdesktop-4.8))
- [x] Extend controls ([link](https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/how-to-inherit-from-existing-windows-forms-controls?view=netframeworkdesktop-4.8))
- Composite user controls
- [x] Overview ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/how-to-inherit-from-the-usercontrol-class?view=netframeworkdesktop-4.8) [link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/varieties-of-custom-controls?view=netframeworkdesktop-4.8))
- [x] Constituent controls ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/constituent-controls?view=netframeworkdesktop-4.8))
- [x] Tutorial: Create a user control ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/how-to-inherit-from-the-usercontrol-class?view=netframeworkdesktop-4.8))
- User-drawn controls #1667
The cut articles from this section are mostly cut because we'll be porting them in a different way to support how designers are done in .NET. The `OnPaint` article is cut because the information is in the Overview.
- [x] Overview ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/user-drawn-controls?view=netframeworkdesktop-4.8))
- [ ] ~Rendering an interface with OnPaint~ ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/overriding-the-onpaint-method?view=netframeworkdesktop-4.8) [link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/rendering-a-windows-forms-control?view=netframeworkdesktop-4.8))
- [ ] ~Tutorial: Create a new progress control~ ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/how-to-create-a-windows-forms-control-that-shows-progress?view=netframeworkdesktop-4.8))
- Common tasks
- [x] Create a simple control ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/how-to-develop-a-simple-windows-forms-control?view=netframeworkdesktop-4.8))
- [ ] Visual Studio designer support
This is changing completely for .NET 6/7. This content needs to be reviewed before its ported and it shouldn't be done by myself, but probably by a winforms team member.
- [x] Overview ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/varieties-of-custom-controls?view=netframeworkdesktop-4.8#custom-design-experience) [link](https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2013/307hck25(v=vs.120)) [link](https://docs.microsoft.com/previous-versions/visualstudio/visual-studio-2013/37899azc(v=vs.120)) [link](https://learn.microsoft.com/en-us/dotnet/desktop/winforms/controls/attributes-in-windows-forms-controls?view=netframeworkdesktop-4.8))
- [x] Designer attributes ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/how-to-apply-attributes-in-windows-forms-controls?view=netframeworkdesktop-4.8#class-level-attributes))
- [x] Troubleshoot designer errors ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/design-time-errors-in-the-windows-forms-designer?view=netframeworkdesktop-4.8))
- Common tasks
- [x] Manage control properties set by the designer ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/defining-default-values-with-the-shouldserialize-and-reset-methods?view=netframeworkdesktop-4.8))
- [x] Provide an image for the toolbox ([link](https://docs.microsoft.com/dotnet/desktop/winforms/controls/how-to-provide-a-toolbox-bitmap-for-a-control?view=netframeworkdesktop-4.8))

---
[Associated WorkItem - 84626](https://dev.azure.com/msft-skilling/Content/_workitems/edit/84626)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.