Поделиться через


AttributeCallbackBuilder.AddCustomAttributes - метод (array<Attribute[])

Добавление содержимого заданных атрибутов к этому конструктору.

Пространство имен:  Microsoft.Windows.Design.Metadata
Сборка:  Microsoft.Windows.Design.Extensibility (в Microsoft.Windows.Design.Extensibility.dll)

Синтаксис

'Декларация
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[]
)

Параметры

  • attributes
    Тип: array<System.Attribute[]
    Массив добавляемых атрибутов.

Исключения

Исключение Условие
ArgumentNullException

Параметр attributes имеет значение nullпустая ссылка (Nothing в Visual Basic).

Заметки

Для разрешения конфликтов применяется стратегия «побеждает последний».

Примеры

В следующем примере показано, как добавить атрибут к типу с помощью класса AttributeCallbackBuilder. Данный пример кода является частью большого примера, приведенного в описании класса AttributeCallbackBuilder.

callbackBuilder.AddCustomAttributes(
    new DefaultPropertyAttribute("Content"));

Безопасность платформы .NET Framework

См. также

Ссылки

AttributeCallbackBuilder Класс

AddCustomAttributes - перегрузка

Microsoft.Windows.Design.Metadata - пространство имен

AttributeTableBuilder

AddCallback

AttributeTable