XamlWriter Class

.NET Framework (current version)
 

Provides default implementation and base class definitions for a XAML writer. This is not a working default XAML writer; you must either derive from XamlWriter and implement its abstract members, or use an existing XamlWriter derived class.

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


public abstract class XamlWriter : IDisposable

NameDescription
System_CAPS_protmethodXamlWriter()

Initializes a new instance of the XamlWriter class.

NameDescription
System_CAPS_protpropertyIsDisposed

Gets whether Dispose has been called.

System_CAPS_pubpropertySchemaContext

When implemented in a derived class, gets the active XAML schema context.

NameDescription
System_CAPS_pubmethodClose()

Closes the XAML writer object.

System_CAPS_protmethodDispose(Boolean)

Releases the unmanaged resources used by the XamlWriter and optionally releases the managed resources.

System_CAPS_pubmethodEquals(Object)

Determines whether the specified object is equal to the current object.(Inherited from Object.)

System_CAPS_protmethodFinalize()

Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.(Inherited from Object.)

System_CAPS_pubmethodGetHashCode()

Serves as the default hash function. (Inherited from Object.)

System_CAPS_pubmethodGetType()

Gets the Type of the current instance.(Inherited from Object.)

System_CAPS_protmethodMemberwiseClone()

Creates a shallow copy of the current Object.(Inherited from Object.)

System_CAPS_pubmethodToString()

Returns a string that represents the current object.(Inherited from Object.)

System_CAPS_pubmethodWriteEndMember()

When implemented in a derived class, produces the representation of an end member node.

System_CAPS_pubmethodWriteEndObject()

When implemented in a derived class, produces the representation of an end object node.

System_CAPS_pubmethodWriteGetObject()

When implemented in a derived class, produces an object for cases where the object is a default or implicit value of the property being set, instead of being specified as a discrete object value in the input XAML node set.

System_CAPS_pubmethodWriteNamespace(NamespaceDeclaration)

When implemented in a derived class, writes a XAML namespace declaration node.

System_CAPS_pubmethodWriteNode(XamlReader)

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

System_CAPS_pubmethodWriteStartMember(XamlMember)

When implemented in a derived class, writes the representation of a start member node.

System_CAPS_pubmethodWriteStartObject(XamlType)

When implemented in a derived class, writes the representation of a start object node.

System_CAPS_pubmethodWriteValue(Object)

When implemented in a derived class, writes a value node.

NameDescription
System_CAPS_pubinterfaceSystem_CAPS_privmethodIDisposable.Dispose()

This API supports the product infrastructure and is not intended to be used directly from your code. See Dispose.

The two most relevant practical derived classes of XamlWriter are the XamlXmlWriter and XamlObjectWriter classes, as the following details explain:

  • XamlXmlWriter processes a XAML node set and produces an XML text file. This class might be used for serialization or as part of the function of a tool that works with in-memory representation of XAML and produces XAML file output.

  • XamlObjectWriter processes a XAML node set and produces an object graph. This class might be used as part of a full or partial customization of a technology's XAML parser.

XamlWriterSettings is a class for settings that are used by a XamlWriter; however, by default, the XamlWriterSettings class does not hold any specific settings. The XamlWriter base constructor does not use this settings class as an argument, nor does any other XamlWriter member. Instead, the XamlXmlWriter and XamlObjectWriter classes include their own settings classes as construction arguments. These settings classes are XamlXmlWriterSettings and XamlObjectWriterSettings. The settings classes define actual settings values and are based on XamlWriterSettings, so that they can use the XamlWriterSettings merge feature.

.NET Framework
Available since 4.0

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: