0

I am learning vb.net using tutorials. I have been able to build command-line applications without any issue using the vbc -target:exe -out:"...path to executable..." "...path to source file..." but now the tutorial has reached the topic of the event handlers and I need a drag and drop control creator like that within the visual studio to create XAML file that will accompany the source code file. Is there a simple plugin for VS code to add a XAML designer with drag and drop? Also if there is a separate minimal XAML designer that will allow creating visually the control and their placements. I don't want to install the full-blown Visual Studio (I don't even have the space for it in my small SSD). I have been using the basic VS code so far.

Also once I create the XAML file and have the classes with event handlers in a .vb file, what is the syntax to call vbc to build the gui application using command line?

user13892
  • 267
  • 4
  • 12
  • I think xaml is very well suited for just writing it, thanks to the layout system, you can create very easy UI without drag n drop. Do you have a vbproj file for your project? Any chance to build using msbuild instead? – Icepickle May 14 '20 at 18:07
  • No project file, I am using everything raw. I just have a folder with .vb file and I target the same folder to output the .exe file. I am not even using MSBuild tools. I am using the compiler that comes preinstalled with .NET framework in windows 10 in the following location: `C:\Windows\Microsoft.NET\Framework64\v4.0.30319\vbc.exe` – user13892 May 14 '20 at 18:30
  • Well, does [this link](https://learn.microsoft.com/en-us/visualstudio/msbuild/msbuild?view=vs-2019) help you any further? This would help you later on as your project grows. As for XAML, there is really no need to use drag n drop there, you can create your XAML from scratch as well, and then a partial class for your codebehind, where you attach the event handlers – Icepickle May 14 '20 at 18:59
  • Can this be used for WinForms? Aren't XAML files just for WPF in the desktop? I think the OP needs to determine what the next tutorial is targeting. – Mary May 15 '20 at 00:28
  • @Mary I don't know the difference between WinForms and WPF. The instructor in the tutorial said once you understand WPF, translating to the older WinForms would be easier. He also says WPF is the future and using it you are not missing any features from WinForms. – user13892 May 16 '20 at 00:31
  • @Icepickle I just saw the [post](https://stackoverflow.com/questions/33487520/how-to-compile-wpf-program-with-command-line) in which @Zozo says that if you have a separate XAML file defining the interface then direct call to the compiler can't be used. So looks like I have to learn how to use msbuild.exe which itself require its own .msbuild file. Any tutorial or courses that teaches beginners how to write .msbuild files to do compilation for VB.net. Atleast I don't have to install anything since `C:\Windows\Microsoft.NET\Framework64\v4.0.30319\msbuild.exe` is available with .NET framework. – user13892 May 16 '20 at 00:37
  • It sounds like the tutorial is proceeding with WPF which is great. – Mary May 16 '20 at 01:19

1 Answers1

0

There is a designer that is a part of SharpDevelop project. I think it can be useful, if you want a lightweight WPF designer. Its source is downloadable from bottom link. https://github.com/icsharpcode/WpfDesigner

Also you can install SharpDevelop. It is very lightweight. The installer size is about 13Mb!.

Mehdi
  • 520
  • 1
  • 5
  • 9