XamlXmlWriter.WriteValue Method

Writes a XAML value node to the underlying XmlWriter or TextWriter. Throws an exception if the current position of the XAML node stream is invalid for writing a value, or the writer is in a state where a value cannot be written.

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

public override void WriteValue(
	Object value


Type: System.Object

The value information to write.


The current position of the XAML node stream is not valid for writing a value.


The XAML writer state does not support the writing of a value node.


value specifies a value that is not null or a string.

The input value may be null, which supports explicitly writing out null as a serialized value. This behavior uses the XamlLanguage.Null definition as WriteStartObject input and then immediately calls WriteEndObject.

.NET Framework

Supported in: 4.5, 4

.NET Framework Client Profile

Supported in: 4

Windows 8.1, Windows Server 2012 R2, Windows 8, Windows Server 2012, Windows 7, Windows Vista SP2, Windows Server 2008 (Server Core Role not supported), Windows Server 2008 R2 (Server Core Role supported with SP1 or later; Itanium not supported)

The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
© 2014 Microsoft