IVsPropertyPage.CategoryTitle Method
Returns the category under which your property pages should be displayed in the tree view.
Namespace: Microsoft.VisualStudio.Shell.Interop
Assembly: Microsoft.VisualStudio.Shell.Interop (in Microsoft.VisualStudio.Shell.Interop.dll)
Syntax
'宣言
Function CategoryTitle ( _
iLevel As UInteger, _
<OutAttribute> ByRef pbstrCategory As String _
) As Integer
'使用
Dim instance As IVsPropertyPage
Dim iLevel As UInteger
Dim pbstrCategory As String
Dim returnValue As Integer
returnValue = instance.CategoryTitle(iLevel, _
pbstrCategory)
int CategoryTitle(
uint iLevel,
out string pbstrCategory
)
int CategoryTitle(
[InAttribute] unsigned int iLevel,
[OutAttribute] String^% pbstrCategory
)
function CategoryTitle(
iLevel : uint,
pbstrCategory : String
) : int
Parameters
iLevel
Type: System.UInt32[in] Integer containing the level.
pbstrCategory
Type: System.String%[out, retval] Pointer to the category (folder) under which you want your property page to be displayed.
Return Value
Type: System.Int32
If the method succeeds, it returns S_OK. If it fails, it returns an error code.
Remarks
COM Signature
From vsshell.idl:
HRESULT IVsPropertyPage::CategoryTitle(
[in]UINT iLevel,
[out, retval]BSTR *pbstrCategory
);
If your property page does not have a category and you would prefer it to show on the top level of the tree view directly under the appropriate top-level category, then either implement IPropertyPage alone, or return E_NOTIMPL from this method.
Otherwise, the environment first calls this method with an iLevel value of zero.
You can then return the name of the category that should be the closest direct ancestor of this page in the tree.
The environment will then call you with an iLevel value of one.
If you want your page to be indented one level, then return S_FALSE.
The environment continues to call this method, increasing the value of iLevel by one each time, until you return something other than S_OK, or you reach the environment's internal limit of what it supports.
Returning E_NOTIMPL and S_FALSE stops processing without showing an error to the user. Any value other than S_OK can cause error information to be shown to the user.
Currently the environment only supports two levels of categories:
CatLevel1
CatLevel0
PageName
The Visual Studio categories, Common Properties and Configuration Properties, are above CatLevel1 in the hierarchy. The Visual Studio categories do not count as part of the two levels. You do not return them from get_CategoryTitle.
Permissions
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.