XamlMember Constructor (String, XamlType, Boolean)

.NET Framework (current version)
 

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.

Namespace:   System.Xaml
Assembly:  System.Xaml (in System.Xaml.dll)

public XamlMember(
	string name,
	XamlType declaringType,
	bool isAttachable
)

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:

.NET Framework
Available since 4.0
Return to top
Show: