.net 6 Windows Forms

0 views
Skip to first unread message

Shelly Takacs

unread,
Aug 5, 2024, 11:45:12 AM8/5/24
to plugcortiotrac
Forthe last several Visual Studio release cycles, the Windows Forms (WinForms) Team has beenworking hard to bring the WinForms designer for .NET applications to parity withthe .NET Framework designer. As you may be aware, a new WinFormsdesigner was needed to support .NET Core 3.1 applications, and later .NET 5+applications. The work required a near-complete rearchitecting of the designer,as we responded to the differences between .NET and the .NET Framework basedWinForms designer everyone knows and loves. The goal of this blog post is togive you some insight into the new architecture and what sorts of changes wehave made. And of course, how those changes may impact you as you create customcontrols and .NET WinForms applications.

After reading this blog post you will be familiar with the underlying problemsthe new WinForms designer is meant to solve and have a high-level understandingof the primary components in this new approach. Enjoy this look into thedesigner architecture and stay tuned for future blogs!


While we aimed at complete parity between the OOP designer and the .NETFramework designer for the release of Visual Studio 2022,there are still a few issues on our backlog. That said, the OOP designer in its current iterationalready has most of the significant improvements at all important levels:


In addition, a Form with all its controls and components renders itself in the designerat design time. Therefore, the code that instantiates the form and shows it in theDesigner window must also be executed in .NET and not in .NET Framework, so thatnewer properties available only in .NET also reflect the actual appearance andbehavior of the controls, components, and ultimately the entire Form or UserControl.


Because we plan to continue innovating and adding new features in the future,the problem only grows over time. So we had to design a mechanism that supportedsuch cross-framework interactions between the WinForms designer and Visual Studio.


With the knowledge of these new concepts, it is obvious that adjustments toexisting custom control designers targeting .NET will be required. The extent towhich the adjustments are necessary depends purely on how extensively the customcontrol utilize the typical custom Control Designer functionality.


Let us know what topics you would like hear from us around the WinForms Designer-the new Object Data Source functionality in the OOP Designer and the WinForms Designer SDKare the topics already in the making and on top of our list.


Please also note that the WinForms .NET runtime is open source, and you can contribute!If you have ideas, encountered bugs, or even want to take on PRs around the WinForms runtime,have a look at the WinForms Github repo.If you have suggestions around the WinForms Designer,feel free to file new issues there as well.


If you have used preview versions, try to uninstall (all of) those, and reinstall the latest release. If that does not help, please send a bug report over the VS feedback button (upper right corner of VS) or report a bug in the WinForms GitHub repo.


As the main project I work on is all based on DevExpress WinForms components, due to the instability of both WinForms Designer and/or DevExpress, unfortunately we are unable to migrate the project to .net core. I hope see that working smothly as soon as possible.


Same here. We are migrating our backend to .NET 6, but our WinForms frontend is having lots of problems due to the designer not working. Even under .NET Framework we are experimenting some problems. I hope you get all the problems solved!


You can have two project files in the same directory as your WinForms project: the old .csproj file from the existing .NET Framework project and the new SDK-style .csproj file of the new .NET Core WinForms project.


What about modern windows 11 inspired UI elements? We wanted a modern looking designer that has better and fluent UI designer and elements. Please explain when will we see that as, from the looks of it, this thing still looks like windows 7


For the last 3 weeks I have been intensively learning docker and running it locally. It is really great and I love the simple clear commands, and the fact that it just works and diagnostics and errors are generally clear.


Could you please advise that are there any road map items to enable Docker Windows Container to support .NET WinForms C# applications?

I see tremendous values for this usecase with enterprise customers and .net developers to retain existing investments on .NET winforms apps and promotes acceleration for containerizing legacy .net windows applications. Please review and advise!


Please read the product-specific details in this privacy statement, which provide additional relevant information. This statement applies to the interactions Microsoft has with you and the Microsoft products listed below, as well as other Microsoft products that display this statement.


For individuals in the United States, please refer to our U.S. State Data Privacy Notice and the Washington State Consumer Health Data Privacy Policy for additional information about the processing of your personal data, and your rights under applicable U.S. State data privacy laws.


Most Microsoft sites use cookies, small text files placed on your device which web servers utilize in the domain that placed the cookie can retrieve later. We use cookies to store your preferences and settings, help with sign-in, provide personalized ads, and analyze site operations. For more information, see the Cookies and similar technologies section of this privacy statement.


If you have a privacy concern, complaint, or question for the Microsoft Chief Privacy Officer or EU Data Protection Officer, please contact us by using our web form. For more information about contacting Microsoft, including Microsoft Ireland Operations Limited, see the How to contact us section of this privacy statement.


Microsoft collects data from you, through our interactions with you and through our products. You provide some of this data directly, and we get some of it by collecting data about your interactions, use, and experiences with our products. The data we collect depends on the context of your interactions with Microsoft and the choices you make, including your privacy settings and the products and features you use. We also obtain data about you from third parties.


If you represent an organization, such as a business or school, that utilizes Enterprise and Developer Products from Microsoft, please see the Enterprise and developer products section of this privacy statement to learn how we process your data. If you are an end user of a Microsoft product or a Microsoft account provided by your organization, please see the Products provided by your organization and the Microsoft account sections for more information.


You have choices when it comes to the technology you use and the data you share. When we ask you to provide personal data, you can decline. Many of our products require some personal data to provide you with a service. If you choose not to provide data -required to provide you with a product or feature, you cannot use that product or feature. Likewise, where we need to collect personal data by law or to enter into or carry out a contract with you, and you do not provide the data, we will not be able to enter into the contract; or if this relates to an existing product you are using, we may have to suspend or cancel it. We will notify you if this is the case at the time. Where providing the data is optional, and you choose not to share personal data, features like personalization that use such data will not work for you.


We also obtain data from third parties. We protect data obtained from third parties according to the practices described in this statement, plus any additional restrictions imposed by the source of the data. These third-party sources vary over time and include:


The data we collect depends on the context of your interactions with Microsoft and the choices you make (including your privacy settings), the products and features you use, your location, and applicable law.


Interactions. Data about your use of Microsoft products. In some cases, such as search queries, this is data you provide in order to make use of the products. In other cases, such as error reports, this is data we generate. Other examples of interactions data include:


Content. Content of your files and communications you input, upload, receive, create, and control. For example, if you transmit a file using Skype to another Skype user, we need to collect the content of that file to display it to you and the other user. If you receive an email using Outlook.com, we need to collect the content of that email to deliver it to your inbox, display it to you, enable you to reply to it, and store it for you until you choose to delete it. Other content we collect when providing products to you include:


Video or recordings. Recordings of events and activities at Microsoft buildings, retail spaces, and other locations. If you enter Microsoft Store locations or other facilities, or attend a Microsoft event that is recorded, we may process your image and voice data.


In carrying out these purposes, we combine data we collect from different contexts (for example, from your use of two Microsoft products) or obtain from third parties to give you a more seamless, consistent, and personalized experience, to make informed business decisions, and for other legitimate purposes.

3a8082e126
Reply all
Reply to author
Forward
0 new messages