Export (0) Print
Expand All

IVsTextEditorPropertyCategoryContainer Interface

Allows an object to expose a set of text editor properties.

Namespace: Microsoft.VisualStudio.TextManager.Interop
Assembly: Microsoft.VisualStudio.TextManager.Interop (in microsoft.visualstudio.textmanager.interop.dll)

[GuidAttribute("A6078038-D578-4F32-B9B2-C83E1726454D")] 
[InterfaceTypeAttribute(1)] 
public interface IVsTextEditorPropertyCategoryContainer
/** @attribute GuidAttribute("A6078038-D578-4F32-B9B2-C83E1726454D") */ 
/** @attribute InterfaceTypeAttribute(1) */ 
public interface IVsTextEditorPropertyCategoryContainer
GuidAttribute("A6078038-D578-4F32-B9B2-C83E1726454D") 
InterfaceTypeAttribute(1) 
public interface IVsTextEditorPropertyCategoryContainer

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.

Community Additions

ADD
Show:
© 2014 Microsoft