I am writing a Visual Studio extension that hovers above everything inside the text editor (above selections, text, etc).
[Export(typeof(IWpfTextViewCreationListener))]
[ContentType("csharp")]
[TextViewRole(PredefinedTextViewRoles.Interactive)]
internal sealed class MyAdornmentFactory : MyAdornmentFactoryBase, IWpfTextViewCreationListener
{
[Export(typeof(AdornmentLayerDefinition))]
[Name("MyName")]
[Order(After = PredefinedAdornmentLayers.Text, Before = PredefinedAdornmentLayers.Caret)]
[TextViewRole(PredefinedTextViewRoles.Interactive)]
public AdornmentLayerDefinition EditorAdornmentLayer;
// ...
}
Problem is, that my WPF UserControl always "hides" behind the text - no matter how I play with the OrderAttribute.
Am i doing something wrong? is there something else that can influence this behavior?
EDIT: I can now confirm that it ~sometimes~ work, possibly with connection to running without debugging... does anybody know of a related visual studio bug?
It should Work, or better for me is working setting order in your exaclty way. eg if you start from the template for Highlight 'A' in every line called TextAdornment (comes with vs2010 SDK) and change the zorder from
to
the adornments will be placed over the editor Text. hope it hepls.