Export (0) Print
Expand All

XamlWriter.WriteNode Method

.NET Framework 4.6 and 4.5

Performs switching based on node type from the XAML reader (XamlReader.NodeType) and calls the relevant Write method for the writer implementation.

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

public void WriteNode(
	XamlReader reader


Type: System.Xaml.XamlReader

The reader to use for node determination.


reader is null.


The default implementation encountered a XamlNodeType that is not in the default enumeration.

Notes for Inheritors

The WriteNode method is not a virtual method because it has practical implementation for all existing XamlNodeType values. Based on XamlNodeType, WriteNode calls into the Write virtual members that are dedicated to particular node types.

If you have an advanced XAML writing scenario that expands the XAML type system and XAML node stream concept so that new node types are defined, do not use WriteNode calls in your logic. You must instead provide your own alternative for node-type switching logic in the class or in virtual overrides.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4
© 2015 Microsoft