XamlObjectWriter.WriteStartMember Method (XamlMember)

.NET Framework (current version)

Writes a new member node into the current object scope, and the scope becomes a new member scope.

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

public override void WriteStartMember(
	XamlMember property


Type: System.Xaml.XamlMember

The XAML property to write. Typically you obtain this value from a XAML reader through the XAML node stream intermediate.

Exception Condition

property has IsUnknown set to true.


UnknownContent passed, which indicates that the XAML node stream contained content for an object that does not support content.


Attempted to write a start member in an invalid scope.


property specifies a property that is already explicitly set in the parent object scope.


property is null.


Watch for a XamlDuplicateMemberException, which occurs when the same XAML property is set twice in the XAML input. In simple cases, such as when the same property is set in both attribute syntax and property element syntax, you can easily see this exception in the input markup. However, more subtle cases can occur that are more difficult to spot. For example, this exception might occur if you set a XAML content property, if you involve XAML ambient properties, and if a property enables both an attachable usage and an instance usage. In the debugging phases of development, you can often locate this exception by viewing the intermediate XAML node representation that connects the markup read and the object graph write.

.NET Framework
Available since 4.0
Return to top