XamlServices::Save Method (Object^)

.NET Framework (current version)
 

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
Available since 4.0
Return to top
Show: