Custom class designer in Visual Studio 2010 - c#

I made an application at the office which runs a bunch of ProcessManager objects which themselves run a bunch of Process objects.
I have been thinking in creating a wizard to create automaticly the classes needed, but I want now to create a custom designer for creating and editing the classes. By designer, I mean like the LinqToSql designer and so on.
I wasn't able to find any information about it, or at least clear one. I've been looking at how to create a new editor for vs 2010 or add design-time ability, but none of theses researches helped me.
The ideal would be to have let's say ProcessManagerClass1.cs and ProcessManagerClass1.designer.cs and when opening the first one, it would open the custom designer.
Do you know how to do it and give me some links for tutorials or documentation??
Thank you for your help,
Vincent

I would start with the Visualization and Modeling SDK for Visual Studio 2010, which was formerly known as the Domain Specific Languages SDK. It is the way to create custom designers in Visual Studio. To use it, you first have to install the Visual Studio 2010 SDK (SP1 here, but you may have to run them in order, which means this first, then the Visualization SDK, then SP1)

Related

Umbraco 7 and Visual Studio 2013

Ive got Umbraco 7 installed on my web server with the usual default skins and such and, what I want to do is create my own template(s) to use on the site ill be creating. Now Ive looked at all the documentation in Umbraco and all it really spends its time doing is talking about using an existing template code then adding CSS, Javascript and such. that's all well and good, but I want to use visual studio to develop this site/Application. the problem is that the Visual Studio template developed by Warren Buckley doesn't work on Visual Studio 2013 at all and there's no sign of him sorting this out it would seem...
What I want to do is develop the various templates I need, then add Bootstrap, develop custom menus, Forms for Credit card processing, emailing, etc (Not sure where you do this in Umbraco.. Macros perhaps?) then manage the content only in Umbraco. The developers of Umbraco don't seem to grasp the existence of Visual Studio or updating any documentation concerning Visual studio 2013 or Umbraco 7.
In short, All I bloody want to do is develop this Friggin thing in VS 2013, then manage content in Umbraco.. Umbraco is installed and running, VS 2013 sees the file content and can communicate with the web server perfectly..
Any help on this would be hot!!!!
You should consider using NuGet. Just create an empty project in Visual Studio, go to Nuget Package Manager Console and type
Install-Package UmbracoCms
Then it installs everything you need, and once it's done you run the application and it jumps straight into the setup. You can choose a custom setup where you choose DB options and starter kits and so forth.
And it definitely works in Visual Studio, I've done it plenty of times.
First off, I'd recommend buying one month of Umbraco TV and watching the Implementor and Developer track: http://umbraco.tv/
Generally, you can edit css, js, views, and partial views in Visual Studio. You will need to create Document Types in the back-office because they are in the database. That is, unless you want to use a code-first style package like Ditto: https://our.umbraco.org/projects/developer-tools/ditto.
Also, the Templates actually have a record in the database. So you must create them in the back-office if you need to connect them to DocumentTypes / Content. Or you could use code-first.

Visual Studio "document outline" for C# file

In Visual Studio (2013/2015/2017), the Document Outline window for C# files is always empty ("There are no items to show for the selected document.").
It seems that this functionality is not (not yet / no more) implemented.
But then, how do I view the structure of the file? Is there any extension which implements this functionality?
showing only the selected/opened file
show regions
move/rename members
show documentation
Using the Solution Explorer and Class View are NOT the solution.
In the old Visual Studio 2003, I did use a self written Add-In, because it was easy to read the structure. (There were also other tools but I cannot find them anymore). So I ask here which solution you know. :-)
EDIT: Similar question also found:
How to show code outline in Visual Studio?
UPDATE: After 10 years the feature has finally arrived in VS 2022
This feature has been added in Visual Studio 2022 17.4.0:
You can now easily view a file’s structure at a glance in the Document Outline window. The Document Outline window displays the symbol tree of the file in the editor helping you quickly navigate and edit project files. You can open Document Outline by going to View > Other Windows > Document Outline or by using the shortcut Ctrl+Alt+T.
Update: This feature was disabled in v17.4.4 for the following reason:
After we released 17.4, we found some significant performance problems with the C# implementation of Document Outline that we didn’t catch during preview usage. We’ve temporarily disabled the feature, and are spending more time working on it to address these issues. These changes are larger than we’d usually like to include in a revision release, and need more bake time, so 17.4.3 [sic] onwards & 17.5 will both ship with the feature disabled. I know this is disappointing, but we have it back in no time and enabled in a future VS update.
There is also CodeMaid which provides the same functionality as JetBrains Resharper, but is free.
The best solution I found at present is:
JetBrains ReSharper (v8.0+) has a File Structure window which shows the structure of the current file as tree (types/members) and regions are also supported.
If you don´t have ReSharper, you can´t miss the Productivity Power Tools, made by Microsoft itself.
There's a specific version for each of Visual Studio versions. More info on these links:
VS2013
VS2012
VS2010
They have a feature called Solution Navigator
Also, there's this one that seems very interesting for bring alot of cool customizations to Visual Studio IDE, called VSCommands. It's worth to checkout their website => http://vscommands.squaredinfinity.com/features
It helps you look at the nested structure of certain types of files, e.g. windows forms designer file, open a form designer you should see all controls on the form shown in nested structure in the document outline window.

Using VS Isolated Shell as UI scaffolding

I am exploring the possibility of using Visual Studio isolated shell as UI scaffolding for my WPF application. The application will contain custom "document" windows as well as many side tool windows used to display extra information. I need the tool windows and document windows to either be controlled by a main controller or easily communicate with one another.
There are VERY FEW documentations on VS isolated shell and even fewer examples. So I am hoping that someone with previous experience in developing custom apps or IDEs using VS isolated shell can help me with this.
Is it feasible to use VS isolated shell just for its UI scaffolding purposes? If so, how can I essentially erase all of the inherited features from Visual Studio and custom everything from menu bars to document pages? Or is it better to use some other UI scaffolding library, such as AvalonDocks? The benefit of using VS shell is that it's much more stable and I can easily port it into Visual Studio as a custom tool window if I need to.
Much appreciated!
You can have a look at recent samples from the Visual Studio Development team:
http://blogs.msdn.com/b/vsx/archive/2014/05/30/vs-2013-sdk-samples-released.aspx

Visual Studio Class Diagram Viewer stand alone

Visual Studio Makes Class diagrams and if we open it in text editor program it is a simple XML. Surely we can generate that on runtime. But the problem is although you have visual studio to see the Class Diagram Generated but what solution is there if we want to deploy application where there is no Visual Studio Installed?
Is there any possibility or available plugin or library that can generate Class diagram or UML diagram from XML?
Can we somehow use Visual Studio Class Diagram to view it on runtime?
Not Sure but what if we generate xml on Back end and then if possible create Image (png or gif) using some builtin plugin and display that? (I am really not sure about this idea :()
I have seen NClass It is very good but a bit complex and it is not developed through XML.
I suggest to use PowerToys for Class Designer (http://modeling.codeplex.com). It improves the Class Designer and allows you to export diagrams to HTML. This way is easy to distribute to any machine.
As an alternative, you can take a different path with reflection, in this case you don't need the visual studio class diagram; the diagrams are generated by inspecting the requested types. I suggest to read the articles by Sacha Barber (http://www.codeproject.com/Articles/17823/100-Reflective-Class-Diagram-Creation-Tool and http://www.codeproject.com/Articles/207280/200-Reflective-Class-Diagram-Creation-Tool). Maybe you can customize his application.
In Visual Studio Enterprise 2017:
Quit Visual Studio if it is running
Start Visual Studio Installer
Click dropdown list "More" and select "Modify"
In section "Code tools", check the option for "Class Designer"
Click button: Modify
Result: now the Class Diagram should load from Solution Explorer as UML.

VS2010 add-in custom menu item in files of Solution Explorer

I need to create a custom menu item for Visual Studio 2010 Add-in in C#, but I have had no luck in finding a solution for my needs.
I am aware that there was a similar post (Visual Studio Add-In - adding a context menu item to solution-explorer), but it did not help, as the blog follows the process through the integration package, and the video is done through VB. I had attempted to convert the VB syntax to the C# syntax, but about half way through the video, the Add-in methods has significantly changed from 2005 to 2010, as some of the methods have removed or changed.
Is there any good tutorials on making a custom menu item on the Solution Explorer in the lastest Visual Studio in C#, and is there a good website that could be used as a reference for looking over the VS add-in API? I've used Microsoft's main website, however it is confusing and wordy, which is difficult to understand and find the methods, properties, or commands that I am looking for.
Any help would be appreicated, Thanks in advance.
what are you writing? a number of cool add-ons already exist that might solve your problem..
such as vs 2010 Pro Power Tools
I don't know anything about it but you might want to check out MME MenuManagerTemplate and the sister project on CodePlex Managed Menu Extensions
Looks like the majority of the code is in the project on CodePlex so you could see how that project is implemented.

Categories

Resources