New to Telerik UI for WPF? Start a free 30-day trial

Tagger class responsible for creating collapsible (folding) regions in CSharp code document.

Definition

Constructors

Initializes a new instance of the CSharpFoldingTagger class.

C#
public CSharpFoldingTagger(ITextDocumentEditor editor)
Parameters:editorITextDocumentEditor

The syntax editor.

Methods

Builds the multiline comment folding regions.

C#
protected virtual void BuildCommentsSectionFoldedRegions()

Builds the 'usings' folding region.

C#
protected virtual void BuildUsingSectionFoldedRegion()

Gets the 'usings' folding region's tooltip content.

C#
protected virtual string BuildUsingSectionToolTipContent(Span usingSpan)
Parameters:usingSpanSpan

Span containing the usings section.

Returns:

string

The tooltip content.

Coerces the default 'usings' folding region's span.

C#
protected virtual Span CoerceUsingSectionSpan(Span defaultUsingSpan)
Parameters:defaultUsingSpanSpan

Default 'usings' region span is from the end of the first using word to the end of the line containing the last using word.

Returns:

Span

The coerced span.

Gets the text displayed in the collapsed folding section.

C#
protected override string GetFoldingRegionTitle(string inputValue, Span span, string startText)
Parameters:inputValuestring

The document string.

spanSpan

The span defining the folded region.

startTextstring

The start text of the collapsible (folding) section.

Returns:

string

The region title.

Overrides: BracketFoldingTagger.GetFoldingRegionTitle(string, Span, string)

Gets the folding region's tooltip content.

C#
protected override string GetFoldingRegionToolTipContent(Span foldingSpan)
Parameters:foldingSpanSpan

The span starting from the regions' start text and ending after the regions' end text.

Returns:

string

The tooltip content.

Overrides: BracketFoldingTagger.GetFoldingRegionToolTipContent(Span)

Rebuilds the list of all collapsible (folding) regions.

C#
protected override void RebuildFoldingRegions()

Overrides: BracketFoldingTagger.RebuildFoldingRegions()