IVSMDDesignerService.RegisterDesignViewAttribute Method
Registers the specified attribute value for the specified file.
Namespace: Microsoft.VisualStudio.Designer.Interfaces
Assembly: Microsoft.VisualStudio.Designer.Interfaces (in Microsoft.VisualStudio.Designer.Interfaces.dll)
Syntax
'宣言
Sub RegisterDesignViewAttribute ( _
pHier As Object, _
itemid As Integer, _
dwClass As Integer, _
pwszAttributeValue As String _
)
void RegisterDesignViewAttribute(
Object pHier,
int itemid,
int dwClass,
string pwszAttributeValue
)
Parameters
- pHier
Type: System.Object
The T:Microsoft.VisualStudio.Shell.Interop.IVSHierarchy object.
- itemid
Type: System.Int32
The VSConstants.VSITEMID.
- dwClass
Type: System.Int32
The index of the class. The only requirement is that it be unique for each class and be in increasing value for each class declared in the file.
- pwszAttributeValue
Type: System.String
The name of the attribute value.
Remarks
This value is the result of the compiler searching the value passed to the constructor of the DesignerCategoryAttribute. If no such attribute is found, the compiler will pass nulla null reference (Nothing in Visual Basic) into the pwszAttribute value below. The value for dwClass is a number indicating the index of the class. Typical implementations of this may return either the line number on which the class is defined or a class count value.
.NET Framework Security
- 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.