Sdílet prostřednictvím


XamlDirective Konstruktory

Definice

Inicializuje novou instanci XamlDirective třídy.

Přetížení

XamlDirective(String, String)

Inicializuje novou instanci XamlDirective třídy, určuje hodnoty pro název a jeden obor názvů XAML. Tento podpis použijte pouze v případě, že chcete nebo očekáváte IsUnknown , že se bude pro direktivu hlásit true .

XamlDirective(IEnumerable<String>, String, XamlType, XamlValueConverter<TypeConverter>, AllowedMemberLocations)

Inicializuje novou instanci XamlDirective třídy a určuje hodnoty pro každou hodnotu písmena XamlDirective.

XamlDirective(String, String)

Inicializuje novou instanci XamlDirective třídy, určuje hodnoty pro název a jeden obor názvů XAML. Tento podpis použijte pouze v případě, že chcete nebo očekáváte IsUnknown , že se bude pro direktivu hlásit true .

public:
 XamlDirective(System::String ^ xamlNamespace, System::String ^ name);
public XamlDirective (string xamlNamespace, string name);
new System.Xaml.XamlDirective : string * string -> System.Xaml.XamlDirective
Public Sub New (xamlNamespace As String, name As String)

Parametry

xamlNamespace
String

Primární obor názvů XAML, kde může XamlDirective existovat.

name
String

Název identifikace .XamlDirective

Poznámky

Důležité

Tento podpis konstruktoru vždy vygeneruje identifikátor direktivy, kde IsUnknown sestavy true pro systém typů XAML. Pokud jsou k dispozici potřebné informace (typ backingu a položka informací o textové syntaxi pro převod) a chcete identifikátor, který může direktivu použít, použijte místo toho podpis konstruktoru XamlDirective.XamlDirective .

Pokud použijete tento podpis, AllowedLocation hodnota instance je Any; a Type hodnota a TypeConverter hodnota jsou oba null.

Platí pro

XamlDirective(IEnumerable<String>, String, XamlType, XamlValueConverter<TypeConverter>, AllowedMemberLocations)

Inicializuje novou instanci XamlDirective třídy a určuje hodnoty pro každou hodnotu písmena XamlDirective.

public:
 XamlDirective(System::Collections::Generic::IEnumerable<System::String ^> ^ xamlNamespaces, System::String ^ name, System::Xaml::XamlType ^ xamlType, System::Xaml::Schema::XamlValueConverter<System::ComponentModel::TypeConverter ^> ^ typeConverter, System::Xaml::Schema::AllowedMemberLocations allowedLocation);
public XamlDirective (System.Collections.Generic.IEnumerable<string> xamlNamespaces, string name, System.Xaml.XamlType xamlType, System.Xaml.Schema.XamlValueConverter<System.ComponentModel.TypeConverter> typeConverter, System.Xaml.Schema.AllowedMemberLocations allowedLocation);
new System.Xaml.XamlDirective : seq<string> * string * System.Xaml.XamlType * System.Xaml.Schema.XamlValueConverter<System.ComponentModel.TypeConverter> * System.Xaml.Schema.AllowedMemberLocations -> System.Xaml.XamlDirective
Public Sub New (xamlNamespaces As IEnumerable(Of String), name As String, xamlType As XamlType, typeConverter As XamlValueConverter(Of TypeConverter), allowedLocation As AllowedMemberLocations)

Parametry

xamlNamespaces
IEnumerable<String>

Sada oborů názvů XAML, ve kterých může XamlDirective existovat, předaná jako výčet řetězců identifikátorů.

name
String

Název identifikace .XamlDirective

xamlType
XamlType

Typ XAML, který zálohuje XamlDirective.

typeConverter
XamlValueConverter<TypeConverter>

Převaděč typů, který se používá XamlDirective pro převod textové syntaxe.

allowedLocation
AllowedMemberLocations

Hodnota výčtu AllowedMemberLocations .

Výjimky

Parametr xamlType je null.

Poznámky

Tento konstruktor je nutné použít k vygenerování sestavy, která není sestava XamlDirective IsUnknown jako true.

Platí pro