XamlDirective Konstruktory

Definicja

Inicjuje nowe wystąpienie klasy XamlDirective.

Przeciążenia

XamlDirective(String, String)

Inicjuje XamlDirective nowe wystąpienie klasy, określając wartości nazwy i jedną przestrzeń nazw XAML. Użyj tego podpisu tylko wtedy, gdy chcesz lub spodziewasz się IsUnknown zgłosić true dyrektywę.

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

Inicjuje XamlDirective nowe wystąpienie klasy, określając wartości dla każdej wartości dla każdego przypadku klasy XamlDirective.

XamlDirective(String, String)

Inicjuje XamlDirective nowe wystąpienie klasy, określając wartości nazwy i jedną przestrzeń nazw XAML. Użyj tego podpisu tylko wtedy, gdy chcesz lub spodziewasz się IsUnknown zgłosić true dyrektywę.

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

Podstawowa przestrzeń nazw XAML, w której może istnieć XamlDirective .

name
String

Nazwa identyfikująca .XamlDirective

Uwagi

Ważne

Ten podpis konstruktora zawsze generuje identyfikator dyrektywy, w której IsUnknown raporty true dla systemu typów XAML. Jeśli niezbędne informacje są dostępne (typ kopii zapasowej i element informacji o składni tekstowej do konwersji) i chcesz identyfikator, który może zastosować dyrektywę, należy zamiast tego użyć podpisu konstruktora XamlDirective.XamlDirective .

Jeśli używasz tego podpisu, AllowedLocation wartość wystąpienia to Any, a Type wartość i TypeConverter wartość to .null

Dotyczy

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

Inicjuje XamlDirective nowe wystąpienie klasy, określając wartości dla każdej wartości dla każdego przypadku klasy 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>

Zestaw przestrzeni nazw XAML, w których może to XamlDirective istnieć, przekazany jako wyliczalny zestaw ciągów identyfikatora.

name
String

Nazwa identyfikująca .XamlDirective

xamlType
XamlType

Typ XAML, który wspiera element XamlDirective.

typeConverter
XamlValueConverter<TypeConverter>

Konwerter typów używany XamlDirective do konwersji składni tekstu.

allowedLocation
AllowedMemberLocations

Wartość AllowedMemberLocations wyliczenia.

Wyjątki

Parametr xamlType ma wartość null.

Uwagi

Należy użyć tego konstruktora, aby wygenerować element XamlDirective , który nie raportuje IsUnknown jako true.

Dotyczy