Question

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.

Was it helpful?

Solution

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top