简体   繁体   中英

How to create Visual Studio…file extension shells?

I hope this doesn't sound like a stupid question, as I do not exactly know what terms and technologies are involved.

When you open a .cs file in Visual Studio, the code editor opens and displays the content in the main window (Code Editor) with syntax highlighting and stuff. When you open a .txt file, the same thing happens, except without any fancy extras because it's a plain text.

But now, there are several files that open a whole custom UI that enables you to edit the base file .xxx with the help of dialogs etc.

As an example, a ftp client: In the project, there's a file something.ftp with the following content:

connection = [
   server: 192.168.1.52
   port: 21
   startdir: "C:\dasdasd\asdasd"
]

So a UI pops up where you can edit the base file window based, connect to a remote server, view its remote directory contents etc.

Are those so called Shell Extensions ? Or Add-ins ? Or Project Types ?

I believe they are called Custom Editors, check out this for some info on how to create one. You will want to create your own Document View . This explains how to register for a specific extension.

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