편집

다음을 통해 공유


XamlDirective Constructors

Definition

Initializes a new instance of the XamlDirective class.

Overloads

XamlDirective(String, String)

Initializes a new instance of the XamlDirective class, specifying values for a name and a single XAML namespace. Use this signature only when you want or expect IsUnknown to report true for the directive.

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

Initializes a new instance of the XamlDirective class, specifying values for each per-case value of a XamlDirective.

XamlDirective(String, String)

Initializes a new instance of the XamlDirective class, specifying values for a name and a single XAML namespace. Use this signature only when you want or expect IsUnknown to report true for the directive.

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)

Parameters

xamlNamespace
String

The primary XAML namespace where this XamlDirective can exist.

name
String

The identifying name of the XamlDirective.

Remarks

Important

This signature of the constructor always generates an identifier for the directive where IsUnknown reports true for the XAML type system. If the necessary information is available (the backing type and a text syntax information item for conversion) and you want an identifier that can apply the directive, use the XamlDirective.XamlDirective constructor signature instead.

If you use this signature, the AllowedLocation value for the instance is Any; and the Type value and TypeConverter value are both null.

Applies to

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

Initializes a new instance of the XamlDirective class, specifying values for each per-case value of a 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)

Parameters

xamlNamespaces
IEnumerable<String>

A set of XAML namespaces where this XamlDirective can exist, passed as an enumerable set of the identifier strings.

name
String

The identifying name of the XamlDirective.

xamlType
XamlType

The XAML type that backs the XamlDirective.

typeConverter
XamlValueConverter<TypeConverter>

The type converter that this XamlDirective uses for text syntax conversion.

allowedLocation
AllowedMemberLocations

A value of the AllowedMemberLocations enumeration.

Exceptions

The xamlType parameter is null.

Remarks

You must use this constructor to generate a XamlDirective that does not report IsUnknown as true.

Applies to