With Rider 2019.1 EAP (and the stable release coming very soon!), we deliver another major feature right to your front door. With nearly 300 votes, the Windows Forms Designer was one of the highest voted features that got implemented for this release. Since the designer relies on and integrates with Windows-specific components, it’s available only on Windows systems. We’re excited to tell you more about how it works, so let’s open up a Windows Forms project and dive right in!
Using the Windows Forms Designer
After opening (or creating) a Windows Forms project, we can open a form in the editor. This will show us the actual Designer View that displays the form or user control (1) we’re working with. From the Property Grid on the left-hand side (2), we can manipulate available properties like Text, Items, and Fonts, and we can also subscribe to events for double-clicks, mouse hovers and so on. On the right-hand side, the Designer Toolbox provides a list of components that can be added to the form (4). At the bottom, we can find navigation tabs to switch between the designer view and the code behind (3):
Besides framework controls, we can also add our own controls to the Designer Toolbox. After clicking on the Assembly List Configuration (1), we will find a dialog to browse for assemblies containing the controls (2). The selected controls are then listed in the Designer Toolbox list view as well (3):
Creating related projects and files
Rider also ships with project and file templates related to Windows Forms development. When creating a new project, we can now also select the new Desktop Application project template, which further allows to select between UWP, Windows Forms, and WPF as the UI technology:
When adding a new file, the list of templates will include the Windows Form, User Control and Component file template:
Note that these templates will only appear in projects that have a reference added to System.Windows.Forms
.
Error Handling when Forms are Broken
Things do not always go perfect, and if we have to manually edit our designer files, we might break our code. When loading a broken form, Rider will jump to the designer code and highlight the parts that couldn’t be parsed:
One question that remains: does Rider support Windows Forms for .NET Core 3.0 preview? Not yet. We do have a tracking issue which you can subscribe to and/or add comments.
We hope this will make a lot of developers happier. As always, please don’t hesitate to give us some feedback! Is there anything we can further improve? Download Rider 2019.1 EAP now and let us know your thoughts!
Will it work with third party controls? (ie, devexpress?)
There are a couple of reported issues (https://youtrack.jetbrains.com/issue/RIDER-25262), but we also had feedback that everything works just fine. Guess it’s best to just try it out
Please add Winforms desginer support for Linux.
Hi, WinForms is a Windows-specific technology, so currently no plans for a designer on Linux/Mac.
As far as mono framework is concerned most winforms things will run fine on linux and mac… not 100% of it or all custom control techniques that would require hacky winAPI stuff sure… but the majority of stuff people would need could be done in it so I cant see a good reason why it shouldnt be done D:
Sorry that was a bit unspecific. Rider uses the existing WinForms designer available for Windows, which is not compatible with other systems as is.
Could you describe what that ‘Windows specific’ part about WinForms is? Because Mono has been able to run that stuff on Linux for years.
Sorry that was a bit unspecific. Rider uses the existing WinForms designer available for Windows, which is not compatible with other systems as is.
Please consider adding Winforms support for Mac!
Does it mean other frameworks can provide their designers as plugins made in C#?
E.g.: https://github.com/picoe/Eto/issues/780
In principle, many things can be achieved via plugins. However, this blog post doesn’t support that idea in particular. Can you elaborate maybe? You can also mention me in the GitHub issue if that helps (@matkoch).
Is it possible to publish a Windows Form applications to an FTP server?
I think you could follow up with this article: https://www.jetbrains.com/help/idea/uploading-and-downloading-files.html If there’s any further question, don’t hesitate to ask here again.
Does it have TabControl component?
It seems this was not added to the default list. We will fix this for 2019.1.2, which should be out in a few days. Thanks!
Hi,
thank you for the Designer, this is great tool to have and is definitely making easier to decide to buy whole products bundle instead of some product + other famous IDE.
However, one thing that I’m missing most at the moment is some easy and intuitive ability to access controls that are hidden by others, for example because of fill dock style.
I think greatest solution, also for general experience when working with forms design, would be to implement some tree-like view in the structure window when in designer mode (as for now, structure window is empty in designer mode). For example main node will be a form or other base control, then children will be all controls attached to it etc. Some sorting possibilities that should be selectable:
* by individual name
* offset from top relative to parent, then offset from left
* offset from left relative to parent, then offset from top
* by control type
Also in such tree could be provided some ohter properties of the control, and action handlers, so for example one could navigate through the form structure using this tree and then jump to the code of the function that is implementing some handler (maybe each node in the tree will contain some main virtual sub-nodes: “Children” and “Properties” etc, maybe “Children”, “Properties”, “Handlers”, etc.). Btw, I’m still missing Ctrl+F12 behavior like in PhpStorm, then the whole feature could be presented also there. Some quick, scaled down visual preview in floating window on mouse over tree element would be a nice bonus.
ListView is not found in the Designer Toolbox.
Also, the Designer Toolbox needs to be auto-hided when switched to code editor, as it serves no purpose for the code editor.
is there a keyboard shortcut for switching between the Designer and the code? I searched for “designer” in the Settings’ Keymap and nothing relevant came up…
Hey, the action should be called Select Next Tab in multi-editor file.
Well, if this does not work i linux, why would i opt for jetbrains over visual studio
There is no Visual Studio for Linux, so I don’t really follow the question?
Great feature, but almost unusable in many cases without a
Navigator
orTree view
or some other hierarchical representation of the components in the form. There are hidden components and components that are pretty hard to select (e.g. SplitContainer)