允许对象显示一组文本编辑器属性。
命名空间: Microsoft.VisualStudio.TextManager.Interop
程序集: Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)
语法
声明
<InterfaceTypeAttribute()> _
<GuidAttribute("A6078038-D578-4F32-B9B2-C83E1726454D")> _
Public Interface IVsTextEditorPropertyCategoryContainer
[InterfaceTypeAttribute()]
[GuidAttribute("A6078038-D578-4F32-B9B2-C83E1726454D")]
public interface IVsTextEditorPropertyCategoryContainer
[InterfaceTypeAttribute()]
[GuidAttribute(L"A6078038-D578-4F32-B9B2-C83E1726454D")]
public interface class IVsTextEditorPropertyCategoryContainer
[<InterfaceTypeAttribute()>]
[<GuidAttribute("A6078038-D578-4F32-B9B2-C83E1726454D")>]
type IVsTextEditorPropertyCategoryContainer = interface end
public interface IVsTextEditorPropertyCategoryContainer
IVsTextEditorPropertyCategoryContainer 类型公开以下成员。
方法
名称 | 说明 | |
---|---|---|
![]() |
GetPropertyCategory | 返回指定的属性类别。 |
页首
备注
建议使用此方法的方式强制视图设置将调用环境的视图对象 (VsTextView) 的 QueryInterfaceIVsTextEditorPropertyCategoryContainer 接口的。 使用此接口的对象来设置文本编辑器属性。 文本视图当前显示一个类别, GUID_EditPropCategory_View_MasterSettings。 这是强制的设置组视图的。
调用 GetPropertyCategory 并为 rguidProperty 参数指定 GUID_EditPropCategory_View_MasterSettings 的值。 则此方法返回指向 IVsTextEditorPropertyContainer,其中包含用来视图中强制的属性。 任何设置本组中永久是强制的。 如果设置不此组中,则按照 工具/选项 菜单或用户的命令指定的选项。
例如,强制 自动换行,请调用 SetProperty 并指定 VSEDITPROPID_ViewLangOpt_WordWrap的值, idprop 参数的 vt, vt 是 VT_BOOLVariant vt.boolVal 是 VARIANT_TRUE。 若要允许自动换行自由浮动,此属性类别中移除该通过调用 RemoveProperty 并指定 VSEDITPROPID_ViewLangOpt_WordWrap 的值 idprop 参数的。
对调用者的说明
调用此接口公开对象的文本编辑器属性。