IVsExpansionClient.OnItemChosen Method (String, String)
Called when a code snippet name has been selected from an IntelliSense menu.
Assembly: Microsoft.VisualStudio.TextManager.Interop.8.0 (in Microsoft.VisualStudio.TextManager.Interop.8.0.dll)
[in] A string containing the full name of the code snippet.
[in] A string containing the full path to the snippet file.
This method is called when the user selects a code snippet from a list of snippets, typically presented in an IntelliSense menu. The menu is shown as a result of a call to the InvokeInsertionUI method in the IVsExpansionManager interface.
A typical implementation of the InsertNamedExpansion method on the IVsExpansion object that was cached in the IVsExpansionClient object before the InvokeInsertionUI method was called. In fact, the only time the method is called is when the InvokeInsertionUI method is called, either as a result of the user selecting a menu option that triggers the call or if the user is allowed to choose from multiple code snippets that have the same name (for example, if a code snippet shortcut matches more than one code snippet, a "disambiguation user interface" is shown to allow the user to select which code snippet to actually insert).method is to call the