为给定 IWpfTextViewHost 创建 IWpfTextViewMargin。
命名空间: Microsoft.VisualStudio.Text.Editor
程序集: Microsoft.VisualStudio.Text.UI.Wpf(在 Microsoft.VisualStudio.Text.UI.Wpf.dll 中)
语法
声明
Function CreateMargin ( _
wpfTextViewHost As IWpfTextViewHost, _
marginContainer As IWpfTextViewMargin _
) As IWpfTextViewMargin
IWpfTextViewMargin CreateMargin(
IWpfTextViewHost wpfTextViewHost,
IWpfTextViewMargin marginContainer
)
IWpfTextViewMargin^ CreateMargin(
IWpfTextViewHost^ wpfTextViewHost,
IWpfTextViewMargin^ marginContainer
)
abstract CreateMargin :
wpfTextViewHost:IWpfTextViewHost *
marginContainer:IWpfTextViewMargin -> IWpfTextViewMargin
function CreateMargin(
wpfTextViewHost : IWpfTextViewHost,
marginContainer : IWpfTextViewMargin
) : IWpfTextViewMargin
参数
wpfTextViewHost
类型:Microsoft.VisualStudio.Text.Editor.IWpfTextViewHost要为其创建 IWpfTextViewMargin 的 IWpfTextViewHost。
marginContainer
类型:Microsoft.VisualStudio.Text.Editor.IWpfTextViewMargin将包含新创建的边距的边距。
返回值
类型:Microsoft.VisualStudio.Text.Editor.IWpfTextViewMargin
IWpfTextViewMargin 。
备注
,如果此 IWpfTextViewMarginProvider 不适用于此上下文中,输入此方法会返回 nullnull 引用(在 Visual Basic 中为 Nothing) 。
.NET Framework 安全性
- 对直接调用方的完全信任。此成员不能由部分信任的代码使用。有关详细信息,请参阅通过部分受信任的代码使用库。