Aracılığıyla paylaş


StructureTag.HeaderSpan Property

Definition

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

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

Property Value

Implements

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