MSDN > 論壇首頁 > Managed Extensibility Framework > C# code Highlighting/Focus
發問發問
 

問題C# code Highlighting/Focus

  • 2009年5月11日 上午 11:17Omar.Ahmed 使用者勳章使用者勳章使用者勳章使用者勳章使用者勳章
     
    Hello everyone,
    I am creating a package that automates code through voice. It is not a Language Service and just using Code Model. I have done this for If-Else, Try Catch, etc but problem is where Parameters are needed such as fucntions, foreach etc where I need to give the user option to insert variable at his place of choice.
    This happens in code snippets where the parameters are replaceable, highlighted and can be toggled by pressing Tab key.

    for (int i = 0; i < length ; i++)
                        {
                           
                        }
    I can't get the color here but the bold variables are highlighted & colored in VS and you can reproduce that by inserting For Code Snippet
    (Right Click->Insert Snippet-> C#). Please tell me:

    1) How I can achieve this
    2) If not possible than any suggestions/alternate method

    My main purpose is to allow user to enter parameters through voice and he can see choose/see which parameter he is inserting.
    An early response is most appreciated! Thanks in advance

    Regards.