Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All

XamlServices.Save Method (Object)

.NET Framework 4.6 and 4.5

Processes a provided object tree into a XAML node representation, and returns a string representation of the output XAML.

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

public static string Save(
	Object instance
)

Parameters

instance
Type: System.Object

The root of the object graph to process.

Return Value

Type: System.String
The XAML markup output as a string.

The output from this method is the ToString result of an XmlWriter that is created by the method call. That XmlWriter is created by using the following settings: XmlWriterSettings.Indent is true; and XmlWriterSettings.OmitXmlDeclaration is true.

The returned string can be loaded as valid XML through the Create method if you processed the string into a stream, or into a reader more specifically dedicated for XAML.

.NET Framework

Supported in: 4.6, 4.5, 4

.NET Framework Client Profile

Supported in: 4
Show:
© 2015 Microsoft