,当 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 确定如何执行缩进。