Share via


ISmartIndentationService.GetDesiredIndentation Method

Definition

Gets the desired indentation of an ITextSnapshotLine as displayed in ITextView.

public:
 Nullable<int> GetDesiredIndentation(Microsoft::VisualStudio::Text::Editor::ITextView ^ textView, Microsoft::VisualStudio::Text::ITextSnapshotLine ^ line);
public int? GetDesiredIndentation (Microsoft.VisualStudio.Text.Editor.ITextView textView, Microsoft.VisualStudio.Text.ITextSnapshotLine line);
abstract member GetDesiredIndentation : Microsoft.VisualStudio.Text.Editor.ITextView * Microsoft.VisualStudio.Text.ITextSnapshotLine -> Nullable<int>
Public Function GetDesiredIndentation (textView As ITextView, line As ITextSnapshotLine) As Nullable(Of Integer)

Parameters

textView
ITextView

The text view in which the line is displayed.

line
ITextSnapshotLine

The line for which to compute the indentation.

Returns

The number of spaces to place at the start of the line, or null if there is no desired indentation.

Remarks

This service consumes ISmartIndentProviders to determine how to perform the indentation.

Applies to