Dela via


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

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

See Also

Reference

AttributeCallbackBuilder Class

AddCustomAttributes Overload

Microsoft.Windows.Design.Metadata Namespace

AttributeTableBuilder

AddCallback

AttributeTable