IVsTextEditorPropertyCategoryContainer Interface
Allows an object to expose a set of text editor properties.
Assembly: Microsoft.VisualStudio.TextManager.Interop (in Microsoft.VisualStudio.TextManager.Interop.dll)
| Name | Description | |
|---|---|---|
![]() | GetPropertyCategory(Guid, IVsTextEditorPropertyContainer) | Returns the specified property category. |
The recommended way to force view settings is to call QueryInterface on the environment's view object (VsTextView) for the IVsTextEditorPropertyCategoryContainer interface. This interface allows an object to expose a set of text editor properties. The text view currently exposes one category, GUID_EditPropCategory_View_MasterSettings. This is the group of forced settings for a view.
Call GetPropertyCategory and specify a value of GUID_EditPropCategory_View_MasterSettings for the rguidProperty parameter. This method then returns a pointer to IVsTextEditorPropertyContainer, which contains the set of forced properties for the view. Any settings in this group are permanently forced. If a setting is not in this group, then it is following the options specified in the Tools/Options menu or the user's commands.
For example, to force Word Wrap, call SetProperty and specify a value of VSEDITPROPID_ViewLangOpt_WordWrap, vt for the idprop parameter, where vt is a Variant of VT_BOOL where vt.boolVal is VARIANT_TRUE. To allow word wrap to float freely, remove it from this property category by calling RemoveProperty and specifying a value of VSEDITPROPID_ViewLangOpt_WordWrap for the idprop parameter.
Notes to Callers:
Call this interface to expose text editor properties on your object.
