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
'Declaración
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
- 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 nulla null reference (Nothing in Visual Basic).
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.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.