对 ITextSnapshotLine 中的文本和修饰设置格式。
命名空间: Microsoft.VisualStudio.Text.Formatting
程序集: Microsoft.VisualStudio.Text.UI.Wpf(在 Microsoft.VisualStudio.Text.UI.Wpf.dll 中)
语法
声明
Function FormatLineInVisualBuffer ( _
visualLine As ITextSnapshotLine _
) As Collection(Of IFormattedLine)
Collection<IFormattedLine> FormatLineInVisualBuffer(
ITextSnapshotLine visualLine
)
Collection<IFormattedLine^>^ FormatLineInVisualBuffer(
ITextSnapshotLine^ visualLine
)
abstract FormatLineInVisualBuffer :
visualLine:ITextSnapshotLine -> Collection<IFormattedLine>
function FormatLineInVisualBuffer(
visualLine : ITextSnapshotLine
) : Collection<IFormattedLine>
参数
visualLine
类型:Microsoft.VisualStudio.Text.ITextSnapshotLine要设置格式的行。
返回值
类型:Collection<IFormattedLine>
行的格式化文本。
备注
IFormattedLine 对象是 IDisposable ,并且必须显式释放。 ,因为可视化在此缓冲区,实时所提供的 ITextSnapshotLine 必须属于可视缓冲区的快照。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。