简体   繁体   中英

Using Visual Studio Code Editor as a Control in an extension

I'm trying to write an extension for Visual Studio 2010. I want to add a number of code editors next to each other in one window to show a bunch of code extracts in one view. Is it possible to use the Visual Studio Code Editor for C# as a Control to be able to place it into a panel or a WPF Canvas? Is there a dll, where I can find the Visual Studio Code Editor and how can it be loaded?

Thanks a lot ksman

You can use Visual Studio Language Services feature which allows you to create your own language. But you just want to use the code editor only for C# which is already available for you. So, you can use the built in C# language service in order to get full features of a language service.

This shows how to create a separate dialog for a language service. You have to install visual studio SDK for the samples. You can create a user control by using this if we want to put it in a WPF application.

Here is some more links that gives important walkthroughs.

As far as I know there is no way to use a dll and cater this as you ask in the question. This is a quite big job for person who is not quite familar with the language services. But would be interesting...

Finally, using of Visual Studio Language services is the correct way to do this. But bit more work to do. I think the links I've provided will show you the path.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM