IVsHiddenRegion.GetBehavior 方法

返回的隐藏区域行为,即,客户端控件或编辑控件。

命名空间:  Microsoft.VisualStudio.TextManager.Interop
程序集:  Microsoft.VisualStudio.TextManager.Interop(在 Microsoft.VisualStudio.TextManager.Interop.dll 中)

语法

声明
Function GetBehavior ( _
    <OutAttribute> ByRef pdwBehavior As UInteger _
) As Integer
int GetBehavior(
    out uint pdwBehavior
)
int GetBehavior(
    [OutAttribute] unsigned int% pdwBehavior
)
abstract GetBehavior : 
        pdwBehavior:uint32 byref -> int
function GetBehavior(
    pdwBehavior : uint
) : int

参数

  • pdwBehavior
    类型:UInt32%

    [out] 在隐藏的边界行为的指针。 有关更多信息,请参见 HIDDEN_REGION_BEHAVIOR

返回值

类型:Int32
如果方法成功,则返回 S_OK。如果失败,它会返回一个错误代码。

备注

COM 签名

从 textmgr.idl:

HRESULT IVsHiddenRegion::GetBehavior(
   [out] DWORD *pdwBehavior
);

该行为则该隐藏的区域的永久属性。 隐藏的边界行为确定范围是否控件的由客户端或由编辑器。 这是可以与每个选项的默认实现。显式控件的主要功能,如果使用客户端受控件 (hrbClientControlled) 或编辑受控件 (hrbEditorControlled) 行为为隐藏的区域,例如:

  • 横幅文本

    • hrbClientControlled:使用 NewHiddenRegionSetBanner,横幅文本选项指定。

    • hrbEditorControlled:横幅文本总是内置的字符串,表示 “…”默认情况下

  • 提示文本

    • hrbClientControlled:使用 M:Microsoft.VisualStudio.TextManager.Interop.IVsHiddenTextClient.GetTipText(Microsoft.VisualStudio.TextManager.Interop.IVsHiddenRegion,System.String[]) ,提示中指定。

    • hrbEditorControlled:该隐藏的文本的第一个 N 非空白字符用于呈现被截断。

  • 命令协商

    • hrbClientControlled:使用 GetMarkerCommandInfo 方法或 ExecMarkerCommand 方法,上下文菜单命令显示并处理。

    • hrbEditorControlled:上下文菜单命令是固定的。 例如, 隐藏选定内容停止大纲显示

  • 事件通知

    • hrbClientControlled:通知提供使用 IVsHiddenTextClient 接口,有关,则隐藏的区域删除过程,其状态转换,依此类推。

    • hrbEditorControlled:注意没有发送到客户端。 编辑处理内部所有通知。

如果要执行简单概述,请使用 hrbEditorControlled。 如果要隐藏的区域方式的更详细的控件的行为,请使用 hrbClientControlled。

.NET Framework 安全性

请参阅

参考

IVsHiddenRegion 接口

Microsoft.VisualStudio.TextManager.Interop 命名空间