次の方法で共有


IOutliningManager.TryCollapse(ICollapsible) Method

Definition

Tries to collapse a given region.

public:
 Microsoft::VisualStudio::Text::Outlining::ICollapsed ^ TryCollapse(Microsoft::VisualStudio::Text::Outlining::ICollapsible ^ collapsible);
public:
 Microsoft::VisualStudio::Text::Outlining::ICollapsed ^ TryCollapse(Microsoft::VisualStudio::Text::Outlining::ICollapsible ^ collapsible);
Microsoft::VisualStudio::Text::Outlining::ICollapsed TryCollapse(Microsoft::VisualStudio::Text::Outlining::ICollapsible const & collapsible);
public Microsoft.VisualStudio.Text.Outlining.ICollapsed TryCollapse (Microsoft.VisualStudio.Text.Outlining.ICollapsible collapsible);
abstract member TryCollapse : Microsoft.VisualStudio.Text.Outlining.ICollapsible -> Microsoft.VisualStudio.Text.Outlining.ICollapsed
Public Function TryCollapse (collapsible As ICollapsible) As ICollapsed

Parameters

collapsible
ICollapsible

The region to collapse.

Returns

The newly collapsed span if successful, otherwise null.

Remarks

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

The region is already collapsed.

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

Applies to