IOutliningManager.TryCollapse Method

Tries to collapse a given region.

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

ICollapsed TryCollapse(
	ICollapsible collapsible
)

Parameters

collapsible
Type: Microsoft.VisualStudio.Text.Outlining.ICollapsible

The region to collapse.

Return Value

Type: Microsoft.VisualStudio.Text.Outlining.ICollapsed
The newly collapsed span if successful, otherwise null.

There are two cases in which this method can fail to collapse the region:

  1. The region is already collapsed,

  2. The region is partially obscured because another collapsed region partially covers it.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft