Implementing a C# text editor in a separate WPF application RRS feed

  • Question

  • I am adding an interactive C# component to an existing WPF application. I feel (fairly) confident in the backend work: I know how to programmatically use the Scripting APIs to evaluate the code, etc. But I don't know WPF at all and don't know how to just get a text window that will give me the hooks to do things like Intellisense (e.g., a callback that is executed whenever the user types a "."). I would love to start with a simple example if someone can point me to it.



    Mike Barnett

    Friday, January 10, 2020 7:03 PM

All replies

  • I think you need to start with a simple request, at least a single request. Not a very general question about the entire application. Yes, I know you are only asking for an example, but even then, the quest is very general. You are not specific about what you want an example of.

    Sam Hobbs

    Saturday, January 11, 2020 12:52 AM
  • Mike,

    You can try to embed the Visual Studio C# editor with https://github.com/SLaks/VSEmbed

    Sergey Vlasov | Vlasov Studio | Best in class Visual Studio extensions and tools

    Saturday, January 11, 2020 3:16 AM
  • Hi Mike Barbett,

    Sorry for delay in reply.

    According to your description, you could refer these samples from: https://github.com/microsoft/vs-editor-api/tree/master/samples

    Hope it could help you.

    Best Regards,


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com

    Tuesday, January 14, 2020 9:23 AM
  • Hi Mike,

    Intellisense is a service integrated directly into the VS IDE. There is no way to leverage it in a stand-alone application, irrespective of the UI framework involved.

    That being said, a more detailed description of what you're attempting to do here, might result in some additional suggestions or ideas.


    Ed Dore

    Wednesday, January 15, 2020 6:20 PM