AttributeCallbackBuilder.AddCustomAttributes Method (array<Attribute )
Adds the contents of the specified attributes to this builder.
Namespace: Microsoft.Windows.Design.Metadata
Assembly: Microsoft.Windows.Design.Extensibility (in Microsoft.Windows.Design.Extensibility.dll)
Syntax
'Declaration
Public Sub AddCustomAttributes ( _
ParamArray attributes As Attribute() _
)
public void AddCustomAttributes(
params Attribute[] attributes
)
public:
void AddCustomAttributes(
... array<Attribute^>^ attributes
)
member AddCustomAttributes :
attributes:Attribute[] -> unit
public function AddCustomAttributes(
... attributes : Attribute[]
)
Parameters
- attributes
Type: array<System.Attribute[]
An array of new attributes to add.
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | attributes is nulla null reference (Nothing in Visual Basic). |
Remarks
Conflicts are resolved with a last-in-wins strategy.
Examples
The following code example shows how to add an attribute to a type by using the AttributeCallbackBuilder class. This code example is part of a larger example provided for the AttributeCallbackBuilder class.
callbackBuilder.AddCustomAttributes(
new DefaultPropertyAttribute("Content"));
.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.
See Also
Reference
AttributeCallbackBuilder Class