共用方式為


ISmartIndentationService.GetDesiredIndentation 方法

取得所要的縮排的ITextSnapshotLine中所顯示ITextView

命名空間:  Microsoft.VisualStudio.Text.Editor
組件:  Microsoft.VisualStudio.Text.UI (在 Microsoft.VisualStudio.Text.UI.dll 中)

語法

'宣告
Function GetDesiredIndentation ( _
    textView As ITextView, _
    line As ITextSnapshotLine _
) As Nullable(Of Integer)
Nullable<int> GetDesiredIndentation(
    ITextView textView,
    ITextSnapshotLine line
)
Nullable<int> GetDesiredIndentation(
    ITextView^ textView, 
    ITextSnapshotLine^ line
)
abstract GetDesiredIndentation : 
        textView:ITextView * 
        line:ITextSnapshotLine -> Nullable<int> 
function GetDesiredIndentation(
    textView : ITextView, 
    line : ITextSnapshotLine
) : Nullable<int>

參數

傳回值

類型:Nullable<Int32>
您想要的縮排

備註

這項服務會使用ISmartIndentProvider物件來決定如何執行縮排。

.NET Framework 安全性

請參閱

參考

ISmartIndentationService 介面

Microsoft.VisualStudio.Text.Editor 命名空間