I’ve developed an IntelliSense-like Dialog, which should appear on a specific key-stroke. (My project is a VS-Package, my dialog will be opened as a command)
The problem is, I don’t know how to display my dialog at the current cursor-position. There are easy ways of dealing with the currently selected text, e.g. with
TextSelection objSel = (EnvDTE.TextSelection)(dte.ActiveDocument.Selection);
but I can’t obtain any absolute position here.
I’ve searched a lot, but didn’t find anything, which could help me.
Maybe someone can give me a hint or – even better – code examples to solve my problem. I’d really appreciate your help!
I am doing exactly the same thing in a current project, so here is the relevant code copy and pasted. I generate the
activeWpfTextViewobject elsewhere using the following answer: Find an IVsTextView or IWpfTextView for a given ProjectItem, in VS 2010 RC extension.