Compartilhar via


IStructureTag.HeaderSpan Property

Definition

Gets the span of the statement that controls the structural block.

public:
 property Nullable<Microsoft::VisualStudio::Text::Span> HeaderSpan { Nullable<Microsoft::VisualStudio::Text::Span> get(); };
public Microsoft.VisualStudio.Text.Span? HeaderSpan { get; }
member this.HeaderSpan : Nullable<Microsoft.VisualStudio.Text.Span>
Public ReadOnly Property HeaderSpan As Nullable(Of Span)

Property Value

Remarks

For example, in the following snippet of code,

if (condition1 &&
    condition2) // comment
{
    something;
}

this.HeaderSpan would extend from the start of the "if" to the end of comment. this.OutliningSpan would extend from the end of "// comment" to the end of the "}".

If this parameter is null, block structure adornments will still be drawn as long as the OutliningSpan is provided, or the GuideLineHorizontalAnchorPoint and the GuideLineSpan are both provided.

Applies to