The various (above) text about the user interface describes the tool windows in vs. More about the user interface, such as Options page, menu icon, specifically, this article will include the following:
1 Create a custom option page;
2) Set the icon of the menu item;
Create a custom Options page
After you install Dpack, you can see the newly added item in the VS option page (tools->options):
This looks very professional. Many times we develop the add-in need to make a certain configuration, the option page is the best choice: vs users are generally accustomed to a variety of configurations here, so the configuration interface in other places is abrupt.
For add-in, we need to implement the IDTExtensibility2 interface so that it can be managed with VS, and the implementation of the Options page is similar, but the interface here is IDTToolsOptionsPage (from the add-in and the development of the Options page, We can also consider how to develop our own "plug-in" applications. Specifically, it is divided into two steps:
1 Create user control to implement IDTToolsOptionsPage
This interface has 5 methods, which you can refer to here. The most important of these is onaftercreated () and OnOK (), which executes when the VS renders the option page, which is executed when the user clicks OK.
2) in. AddIn the configuration for adding a new option page to a file
Node <toolsoptionspage>,vs is required to load the options page based on that node.
The following is a simple example to introduce the specific implementation process.
Selected text in the search editor
When we write code, we often need to search for some relevant content, such as a certain type of information, then copy the name of the class, open the browser, open Google, search for that class, and sometimes may be in other search engines or MSDN search. Would it be convenient to integrate the search process into vs?