Save Method (String, Object)
Collapse the table of content
Expand the table of content

XamlServices.Save Method (String, Object)

.NET Framework (current version)

Processes a provided object graph into a XAML node representation and then writes it to an output file at a provided location.

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

public static void Save(
	string fileName,
	object instance


Type: System.String

The name and location of the file to write the output to.

Type: System.Object

The root of the object graph to process.

Exception Condition

fileName is an empty string.


fileName is null.

The fileName parameter value is used as the outputFileName input for a call to XmlWriter.Create, which creates a XmlWriter as part of the method call.

.NET Framework
Available since 4.0
Return to top
© 2016 Microsoft