XamlMember Constructor (String^, XamlType^, Boolean)
Initializes a new instance of the XamlMember class using a string name and declaring XamlType information. A XamlMember that is constructed with this signature has significant limitations; see Remarks.
Assembly: System.Xaml (in System.Xaml.dll)
Parameters
- name
-
Type:
System::String^
The string name of the member.
- declaringType
-
Type:
System.Xaml::XamlType^
The XamlType information for the declaring type.
- isAttachable
-
Type:
System::Boolean
true to indicate that the member is attachable; otherwise, false.
| Exception | Condition |
|---|---|
| ArgumentNullException | name or declaringType is null. |
A XamlMember that is constructed with the XamlMember(String^, XamlType^, Boolean) signature returns true for IsUnknown.
For a load path that involves XamlObjectWriter, such a member cannot be written into an object graph. Using the .NET Framework XAML Services implementation, the XamlObjectWriter::WriteStartMember call throws a XamlObjectWriterException when the relevant XamlMember reports true for IsUnknown.
You should not construct a XamlMember with IsUnknowntrue unless your implementation can handle the exceptions from XamlObjectWriter, or you have other ways to adjust the XamlObjectWriter behavior. For example, one or more of the following might be true of your implementation:
The XAML schema context is available later.
You use a member invoker pattern.
You deliberately override XamlObjectWriter::WriteStartMember in a custom XAML writer.
Available since 4.0