-
I created a custom editor margin. It all works fine except for one issue. It also appears in the expression editor of watch and quick watch window. Ho do I ensure my margin is visible inside full text editor only? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
It sounds like you're missing some attributes on your If you add the [Export(typeof(IWpfTextViewMarginProvider))]
[Name(MyMargin.Name)]
[ContentType("text")]
[TextViewRole(PredefinedTextViewRoles.Document)]
public class MyMargin : IWpfTextViewMarginProvider {
// ...
} There are different types of roles that you can use. You can see the pre-defined roles here: https://docs.microsoft.com/dotnet/api/microsoft.visualstudio.text.editor.predefinedtextviewroles |
Beta Was this translation helpful? Give feedback.
It sounds like you're missing some attributes on your
IWpfTextViewMarginProvider
.If you add the
ContentType
attribute and theTextViewRole
attribute, then you should be able to get your margin to only appear on editors.There are different types of roles that you can use. You can see the pre-defined roles here: https://docs.microsoft.com/dotnet/api/microsoft.visualstudio.text.editor.predefinedtextviewroles