❔ How to get certain WPF views in VSCode?
*I'm a newbie so if I say anything wrong you should correct me (in an informative way)
I'm trying to get these windows/views in VSCode (see attached pictures) and I'm think they are Designers for WPF which should come with the .NET Framework.
There's this docs https://learn.microsoft.com/en-us/visualstudio/get-started/csharp/tutorial-wpf?view=vs-2022#what-is-wpf but....
- I already started my project so how would I go back and add this?
- I'm using VSCode and those are instructions for Visual Studio; how can I open those windows in VSCode?
- after searching I see ppl are saying dont code WPF in VSCode? Are they exaggerating or is it that bad?
- is this a viable alternative if I can't just easily open those views? https://blog.ironmansoftware.com/wpf-vs-code-powershell/ what do other ppl who code WPF in VSCode use?
Bruh, ppl always say VSCode, etc. are just IDEs and its just preference but damn there's actual fucntional advantages & now I need Visual Studio to finish this project 😢
Thanks!
Building WPF Applications in Visual Studio Code with PowerShell
Learn how to build WPF applications in Visual Studio Code with PowerShell and PowerShell Pro Tools.
Hello World app with WPF in C# - Visual Studio (Windows)
Create a simple Windows Desktop .NET app in C# with Visual Studio using the Windows Presentation Foundation (WPF) UI framework.
9 Replies
VSCode has no designer
ok but the alternative I linked is reasonable no? Is there anything I should watch out for?
Also even there's no Designer I can manually write the code, cant I? In that case do I need to name the GUI file a special way like "form1.Designer.cs"? Do I need to nest my files a certain way so my other form1.cs file can see the variables from form1.Designer.cs namespace?
You seem to be mixing WPF and Informs, first of all
Technically, yes, it is possible to write all of the code by hand
Much easier with WPF than Winforms, but should be possible in both cases
sorry but what directory lvl do I want to git init my repo? I Don't want to move 1 lvl down b/c I need screenRecorder_VS.sln right?
In the lowest directory of your project
So, in this case, probably in the directory you're currently in, with the
.sln
thanks; oh do I add .sln to .gitignore later; Do you have a favorite resource which you reference to know which extensions/files to add to gitignore?
Why would you add the solution file to gitignore...?
And there's a command that generates a proper gitignore for you
dotnet new gitignore
The sln (solution) file dicatates what projects you have and where they are located relatively to each other. This file should not be ignored. As recommended above, create a gitignore with a command, or search online for a Visual Studio gitignore. When creating a github repository, it offers you to use such a template.
Out of curiosity, could you please share why you have chosen to use VSCode over Visual Studio Community 2022?
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.