次の方法で共有


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)

Syntax

'宣言
Function TryCollapse ( _
    collapsible As ICollapsible _
) As ICollapsed
ICollapsed TryCollapse(
    ICollapsible collapsible
)
ICollapsed^ TryCollapse(
    ICollapsible^ collapsible
)
abstract TryCollapse : 
        collapsible:ICollapsible -> ICollapsed 
function TryCollapse(
    collapsible : ICollapsible
) : ICollapsed

Parameters

Return Value

Type: Microsoft.VisualStudio.Text.Outlining.ICollapsed
The newly collapsed span if successful, otherwise nulla null reference (Nothing in Visual Basic).

Remarks

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.

.NET Framework Security

See Also

Reference

IOutliningManager Interface

Microsoft.VisualStudio.Text.Outlining Namespace