Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XAML Editor for VSCode #280

Closed
Mabenan opened this issue Jan 21, 2019 · 17 comments
Closed

XAML Editor for VSCode #280

Mabenan opened this issue Jan 21, 2019 · 17 comments
Labels
Enhancement Requested Product code improvement that does NOT require public API changes/additions
Milestone

Comments

@Mabenan
Copy link

Mabenan commented Jan 21, 2019

I don't know if i'm here right with this request.

Like the title says it would be nice to have an xaml designer in vscode. As i think many people use dotnet core with vs code.

@thomasclaudiushuber
Copy link
Contributor

thomasclaudiushuber commented Jan 21, 2019

Hi Mabenan,

I like the idea of a XAML editor in VS Code. But honestly all WPF and WinForms developers I know use Visual Studio. And as WPF and WinForms in .NET Core are still Windows-only UI stacks, there's no reason why you shouldn't use Visual Studio. But for cross-platform stuff it would make sense, yes. And for those who want to use VSCode for everything. :)

XAML in VSCode was already discussed a while back here: microsoft/xaml-standard#219 and at some other places like this one: https://forums.xamarin.com/discussion/39483/visual-studio-code-support

Take also a look at this brand new tool called XAML Studio: https://www.microsoft.com/p/xaml-studio/9ntls214tkmq. It's a UWP app that uses VS Code's code editor Monaco.

I like your idea and this issue, but I think currently Microsoft has a lot of work to do to move WPF and WinForms over to .NET Core 3. I think they won't be able to focus on a XAML editor for VSCode (others might even want to have a WinForms designer in VSCode. :)) VSCode is a cross-platform editor, WPF and WinForms are not cross-platform and won't be so with .NET Core 3. Main goal for now is: Bring WPF & WinForms to .NET Core 3 and make it work like a charm. That's why I think a XAML editor for VS Code has at least right now no priority, but maybe the Xamarin team investigates in VSCode support for XAML or maybe we see a cross-platform XAML-based UI-stack in the future that brings VSCode support.

@dotMorten
Copy link
Contributor

dotMorten commented Jan 23, 2019

But honestly all WPF and WinForms developers I know use Visual Studio

To be fair, it is their only option.

there's no reason why you shouldn't use Visual Studio

Not everyone are Microsoft MVPs who gets Visual Studio for free :-) And before you mention the community edition:

An unlimited number of users within an organization can use Visual Studio Community for the following scenarios: in a classroom learning environment, for academic research, or for contributing to open source projects.
For all other usage scenarios:
In non-enterprise organizations, up to five users can use Visual Studio Community. In enterprise organizations (meaning those with >250 PCs or >$1 Million US Dollars in annual revenue), no use is permitted beyond the open source, academic research, and classroom learning environment scenarios described above.

VSCode is a cross-platform editor, WPF and WinForms are not cross-platform and won't be so with .NET Core 3

I don't get this argument. I can build iOS apps in VSCode, but that won't work on Windows or Linux, but only Mac. Why should WPF/WinForms be any different? No one is saying a plugin has to be crossplatform.

@thomasclaudiushuber
Copy link
Contributor

thomasclaudiushuber commented Jan 24, 2019

I don't get this argument. I can build iOS apps in VSCode, but that won't work on Windows or Linux, but only Mac. Why should WPF/WinForms be any different? No one is saying a plugin has to be crossplatform.

Yep. My argument was meant like this: If you need a Windows machine, what's the point of using a cross-platform tool anyway? As I wrote, it makes sense for those who prefer VSCode over Visual Studio. And this is the argument that @Mabenan also wrote, which is ok. Fair point! A plugin would be great for those who want to do everything in VSCode.

But is this the only argument? I don't think that the license for the Community Edition is really an argument to create a plugin for VSCode. You should quote the details for individuals as well, as your quote only contains the license part for organizations:

For individuals
Any individual developer can use Visual Studio Community to create their own free or paid apps

So, I don't see a problem there. But yes, as said, I like @Mabenan idea and this issue. What I said: I'd like to have it, but I don't see it as a top priority. We should do a poll on twitter.

@dotMorten
Copy link
Contributor

So because there's a license for individuals screw the Enterprise and especially government workers who can't get several thousand dollars approved? My point with the quote was to show not everyone can use it. That argument still stands.

@thomasclaudiushuber
Copy link
Contributor

thomasclaudiushuber commented Jan 24, 2019

@dotMorten Ok, now I got it what you mean. Yes, makes absolutely sense, that argument stands.

So we have:

  • VSCode is used by many .NET Core devs, so a VSCode XAML editor would be great to stay in the tool (and maybe not only for WPF, but even UWP and other XAML platforms)
  • Give workers in organizations a tool they can use that does not require a license, as it's hard to get licenses in some organizations
  • VSCode plugin would also have a positive effect on XAML in general, as it shows the investments to support XAML also for pure VSCode devs

I just think it's not the right time before the .NET Core 3 release. This is a thought, doesn't mean I'm right. Of course releasing .NET Core 3 and presenting a VSCode plugin would be great. :-)

I wonder how much effort it would be to bring XAML support in as a Windows-only Plugin. Could the VS Designer be re-used? Or would the XAML Editor that @michael-hawker has created as part of XAML Studio be an option and a point to start with? That one is Monaco based, so I guess we just need to feed it like michael does already.

@rladuca
Copy link
Member

rladuca commented Jan 24, 2019

Generally, WPF designer support is something that is handled by the VS team.

@DoRonMotter Is there a good place (VSFeedback?) for developers to suggest and upvote this sort of feature request for VS Code?

@dotMorten
Copy link
Contributor

Perhaps start with a XAML text editor with autocompletion, error squiggles etc, and leave the design surface out for now. From my experience most people work with xaml this way anyway (winforms is another story and more or less useless without a design surface)

@DoRonMotter
Copy link

@rladuca VS Code is managed on GitHub, yes, you could open issues there. My team has already heard this feedback, but it's better to have an issue open with lots of support (👍).

@michael-hawker
Copy link

Since I've been called out, I can't say I haven't thought about this scenario already. 😉 I haven't looked at testing WPF support for XAML Studio, but have thought about the UWP scenario and integrating XAML Studio as an external preview surface to VS Code as an editor.

Implementing IntelliSense would be they tricky bit. Even though I'm effectively using the same Monaco API, I'm using reflection at the moment to generate suggestions as there's no longer a generated XSD for UWP XAML (though maybe one still exists for WPF?). So, the biggest part of a plugin would be working out the auto-complete scenario. See this article for a tutorial on XSD Monaco based IntelliSense

Hooking it into an external process to render the preview (or report back errors) should be the easier part.

@ptorr-msft ptorr-msft added the Enhancement Requested Product code improvement that does NOT require public API changes/additions label Jan 28, 2019
@MarkusAmshove
Copy link

Wouldn't Omnisharp be the correct place for this, at least for XAML editor?
The C# extension for VS code is powered by Omnisharp and already supports Razor

@stevenbrix stevenbrix added this to the Future milestone Apr 4, 2019
@stevenbrix
Copy link
Contributor

I agree with @MarkusAmshove that is probably the right place for something like this to go. is there an associated issue over there that we can reference as a duplicate?

@SailorMax
Copy link

How about more universal solution like form server? Similar to language server?
If it possible, this allow to make any form builder: XAML, WPF, forms for Android, HTML builder,..

@grubioe
Copy link
Contributor

grubioe commented Jun 24, 2019

Closing this issue, an issue exists in VSCode repo:

microsoft/vscode#60406

@grubioe grubioe closed this as completed Jun 24, 2019
@ghost
Copy link

ghost commented Jun 25, 2019

How does an existing (but closed) issue supercede an open one?

@grubioe
Copy link
Contributor

grubioe commented Jun 26, 2019

Please log a new issue there or ask the VSCode team to re-open the existing one. Thanks!

@stevenbrix
Copy link
Contributor

@Mabenan @adam-becker I filed dotnet/vscode-csharp#3338 to (hopefully) get the ball rolling on this a bit.

@minecraftchest1
Copy link

I do want to add to this. I use Visual Studio Code because I am not able to install Visual Studio on my Laptop for reasons that are irrelevant to this discussion. I would love, at the very least, auto completion for WPF since I type the UI up most of the time.

@ghost ghost locked as resolved and limited conversation to collaborators Apr 18, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Enhancement Requested Product code improvement that does NOT require public API changes/additions
Projects
None yet
Development

No branches or pull requests