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: [橫幅文字] 選項使用指定的NewHiddenRegion和SetBanner。
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 安全性
- 完全信任立即呼叫者。這個成員無法供部分信任的程式碼使用。如需詳細資訊,請參閱從部分受信任程式碼使用程式庫。