AttributeTableBuilder.AddCustomAttributes – metoda (Type, array<Attribute )
Přidá obsah poskytnutý atributy tabulky Tvůrce.
Obor názvů: Microsoft.Windows.Design.Metadata
Sestavení: Microsoft.Windows.Design.Extensibility (v Microsoft.Windows.Design.Extensibility.dll)
'Deklarace
Public Sub AddCustomAttributes ( _
type As Type, _
ParamArray attributes As Attribute() _
)
public void AddCustomAttributes(
Type type,
params Attribute[] attributes
)
public:
void AddCustomAttributes(
Type^ type,
... array<Attribute^>^ attributes
)
member AddCustomAttributes :
type:Type *
attributes:Attribute[] -> unit
public function AddCustomAttributes(
type : Type,
... attributes : Attribute[]
)
- type
Typ: System.Type
Typ přidání atributů do úrovně třídy.
- attributes
Typ: array<System.Attribute[]
Přidat nové atributy type.
Výjimka | Podmínka |
---|---|
ArgumentNullException | typeor attributes is nullodkaz Null (Nothing v jazyce Visual Basic). |
Konflikty vyřešeny s poslední v wins strategie. Při vytváření tabulky velké atribut použít AddCallback metody práce vytváření atributy, dokud jsou potřeba odložit.
Následující příklad kódu ukazuje, jak přidat atribut typu. Příklad kódu je součástí větší příklad stanovené AttributeTableBuilder Třída
builder.AddCustomAttributes( _
GetType(Button), _
New DefaultPropertyAttribute("Content"))
builder.AddCustomAttributes(
typeof(Button),
new DefaultPropertyAttribute("Content"));
- Plná důvěra přímému volajícímu. Částečně zabezpečený kód nemůže tento člen použít. Další informace naleznete v tématu Používání knihoven z částečně důvěryhodného kódu.
AddCustomAttributes – přetížení