Pregunta

I'd like to add a search dialogue popup, really just a text box or something at the top right of the current document. I've messed around with the VSPackage builder and it's easy enough, but I'm having trouble finding out which UI elements I should be looking at.

A ToolWindow doesn't quite fit I don't think -- I'd like what I'm doing to be borderless. I tried just using a custom WPF window by itself but that doesn't play well with the IDE.

¿Fue útil?

Solución

It sounds what you're after is an editor viewport adornment.

This is a type of extension that has a class inherited from Microsoft.VisualStudio.Text.Editor.IWpfTextViewCreationListener

To create an adornment, you can use the Editor Viewport Adornment project template under Visual C#\Extensibility.

Try this example:

http://www.codeproject.com/Articles/55196/Code-InfoBox-Visual-Studio-Extension-VSX-2010

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top