A powerful Windows Forms visual designer extension for Visual Studio Code. Design your WinForms UI with drag-and-drop ease, right from VS Code!
- 🎨 Visual Designer: Drag and drop controls just like in Visual Studio
- 🔄 Two-way Synchronization: Changes in the designer automatically update your
.Designer.cscode - 🌙 Modern Dark UI: Seamlessly matches VS Code's dark theme
- ⚙️ Property Grid: Edit control properties with an intuitive interface
- 🧰 Toolbox: Quick access to all common Windows Forms controls
- 🚀 Context Menu Integration: Right-click any
.csfile to open the designer
- Download the latest
.vsixfile from the Releases page - Open VS Code
- Go to Extensions view (
Ctrl+Shift+X) - Click the
...menu → Install from VSIX... - Select the downloaded
.vsixfile - Reload VS Code when prompted
# Clone the repository
git clone https://github.com/YOUR_USERNAME/winforms-designer-vscode.git
cd winforms-designer-vscode
# Install dependencies
npm install
# Compile the extension
npm run compile
# Package the extension (optional)
npx vsce package-
Open any C# Windows Forms file (
.cs) in VS Code -
Right-click the file in:
- Explorer sidebar, or
- Editor tab at the top
-
Select "Open WinForms Designer"
Alternatively, use the Command Palette (
Ctrl+Shift+P) and run:WinForms: Open WinForms Designer -
The visual designer will launch in a separate window
-
Design your form visually—changes sync back to your
.Designer.csfile!
- Operating System: Windows (WinForms is Windows-only)
- .NET Runtime: .NET 6.0 or later
- VS Code: Version 1.80.0 or higher
winforms-designer-extension/
├── src/
│ └── extension.ts # VS Code extension entry point
├── bin/
│ └── SWD4CS.exe # Bundled WinForms designer executable
├── out/ # Compiled TypeScript output
├── package.json # Extension manifest
└── tsconfig.json # TypeScript configuration
- Open the project folder in VS Code
- Press F5 to launch the Extension Development Host
- Test the extension in the new window
npm install -g @vscode/vsce
vsce packageThe following properties require .resx resource file support and are not currently supported:
- Icon: Form icons cannot be saved/loaded (requires .resx implementation)
- Images: Image resources for PictureBox and other controls
- Localized strings: Resource-based string localization
These properties may be visible in the property grid but changes will not persist to the .Designer.cs file.
Workaround: Manually edit the .Designer.cs file and create corresponding .resx files using Visual Studio or other tools.
This extension wraps the excellent SWD4CS designer by hry2566, making it accessible directly from VS Code.
MIT License - see LICENSE file for details
Found a bug or have a feature request? Please open an issue!
Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to change.
Enjoy designing WinForms in VS Code! 🎉