Bearbeiten

Freigeben über


XamlObjectWriter.WriteStartMember(XamlMember) Method

Definition

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

public:
 override void WriteStartMember(System::Xaml::XamlMember ^ property);
public override void WriteStartMember (System.Xaml.XamlMember property);
override this.WriteStartMember : System.Xaml.XamlMember -> unit
Public Overrides Sub WriteStartMember (property As XamlMember)

Parameters

property
XamlMember

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

Exceptions

property has IsUnknown set to true.

-or-

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

-or-

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.

Remarks

Tip

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.

Applies to