共用方式為


ISmartIndentationService 介面

按下 enter 鍵後,或瀏覽至空的行時,請決定自動縮排。

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

語法

'宣告
Public Interface ISmartIndentationService
public interface ISmartIndentationService
public interface class ISmartIndentationService
type ISmartIndentationService =  interface end
public interface ISmartIndentationService

ISmartIndentationService 類型會公開下列成員。

方法

  名稱 描述
公用方法 GetDesiredIndentation 取得所要的縮排的ITextSnapshotLine中所顯示ITextView

回頁首

備註

這是 MEF 元件的組件,並應該匯入,如下所示:

[Import] ISmartIndentationService selector = null;

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

請參閱

參考

Microsoft.VisualStudio.Text.Editor 命名空間