【发布时间】:2011-10-08 03:43:33
【问题描述】:
我正在编写一个 Visual Studio 扩展,它悬停在文本编辑器内的所有内容之上(在选择、文本等之上)。
[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;
// ...
}
问题是,我的 WPF UserControl 总是“隐藏”在文本后面 - 无论我如何使用 OrderAttribute。
我做错了吗?还有其他因素会影响这种行为吗?
编辑:我现在可以确认它〜有时〜工作,可能连接到运行而无需调试......有人知道相关的视觉工作室错误吗?
【问题讨论】:
标签: wpf visual-studio-2010 adornment