XamlDirective 建構函式

定義

初始化 XamlDirective 類別的新執行個體。

多載

XamlDirective(String, String)

初始化 XamlDirective 類別的新執行個體,並在其中指定名稱和單一 XAML 命名空間的值。 請只有當您想要或預期 IsUnknown 會針對指示詞報告 true 時,才使用這個簽章。

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

初始化 XamlDirective 類別的新執行個體,針對 XamlDirective 的每個個別案例值指定值。

XamlDirective(String, String)

初始化 XamlDirective 類別的新執行個體,並在其中指定名稱和單一 XAML 命名空間的值。 請只有當您想要或預期 IsUnknown 會針對指示詞報告 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)

參數

xamlNamespace
String

這個 XamlDirective 可能存在的主要 XAML 命名空間。

name
String

XamlDirective 的識別名稱。

備註

重要

建構函式的這個簽章一律會產生指示詞的識別碼,其中 IsUnknown 會報告 true XAML 類型系統。 如果可用的必要資訊 (支援類型和文字語法資訊專案進行轉換) ,而且您想要可套用 指示詞的識別碼,請改用建 XamlDirective.XamlDirective 構函式簽章。

如果您使用這個簽章, AllowedLocation 實例的值是 Any ;而 Type 值和 TypeConverter 值都是 null

適用於

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

初始化 XamlDirective 類別的新執行個體,針對 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)

參數

xamlNamespaces
IEnumerable<String>

這個 XamlDirective 可能存在於其中的一組 XAML 命名空間,可當做識別項字串的可列舉集合傳遞。

name
String

XamlDirective 的識別名稱。

xamlType
XamlType

支援 XamlDirective 的 XAML 型別。

typeConverter
XamlValueConverter<TypeConverter>

這個 XamlDirective 用來轉換文字語法的型別轉換器。

allowedLocation
AllowedMemberLocations

AllowedMemberLocations 列舉的值。

例外狀況

xamlType 參數為 null

備註

您必須使用此建構函式來產生 XamlDirective 未報告 IsUnknowntrue 的 。

適用於