IWpfTextViewMarginProvider Interface

Creates an IWpfTextViewMargin for a given IWpfTextViewHost.

Namespace:  Microsoft.VisualStudio.Text.Editor
Assembly:  Microsoft.VisualStudio.Text.UI.Wpf (in Microsoft.VisualStudio.Text.UI.Wpf.dll)

public interface class IWpfTextViewMarginProvider

The IWpfTextViewMarginProvider type exposes the following members.

Public methodCreateMarginCreates an IWpfTextViewMargin for the given IWpfTextViewHost.

This is a MEF component part, and should be exported with the following attribute:


Exporters must supply a MarginContainerAttribute (with one of the PredefinedMarginNames as the container), ContentTypeAttribute, OrderAttribute (with respect to one of the PredefinedMarginNames), TextViewRoleAttribute, and NameAttribute.

For more information about margins, see the "Margins" section of Inside the Editor. For information about extending margins and scrollbars, see the "Extending Margins and Scrollbars" section in Editor Extension Points.

The following example shows how to set up the attributes for this export:

[Order(Before = PredefinedMarginNames.VerticalScrollBarContainer)]
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft