XamlWriter XamlWriter XamlWriter XamlWriter Class

Definition

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.

public ref class XamlWriter abstract : IDisposable
public abstract class XamlWriter : IDisposable
type XamlWriter = class
    interface IDisposable
Public MustInherit Class XamlWriter
Implements IDisposable
Inheritance
XamlWriterXamlWriterXamlWriterXamlWriter
Derived
Implements

Remarks

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.

Constructors

XamlWriter() XamlWriter() XamlWriter() XamlWriter()

Initializes a new instance of the XamlWriter class.

Properties

IsDisposed IsDisposed IsDisposed IsDisposed

Gets whether Dispose(Boolean) has been called.

SchemaContext SchemaContext SchemaContext SchemaContext

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

Methods

Close() Close() Close() Close()

Closes the XAML writer object.

Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

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

Equals(Object) Equals(Object) Equals(Object) Equals(Object)

Determines whether the specified object is equal to the current object.

(Inherited from Object)
GetHashCode() GetHashCode() GetHashCode() GetHashCode()

Serves as the default hash function.

(Inherited from Object)
GetType() GetType() GetType() GetType()

Gets the Type of the current instance.

(Inherited from Object)
MemberwiseClone() MemberwiseClone() MemberwiseClone() MemberwiseClone()

Creates a shallow copy of the current Object.

(Inherited from Object)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)
WriteEndMember() WriteEndMember() WriteEndMember() WriteEndMember()

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

WriteEndObject() WriteEndObject() WriteEndObject() WriteEndObject()

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

WriteGetObject() WriteGetObject() WriteGetObject() WriteGetObject()

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.

WriteNamespace(NamespaceDeclaration) WriteNamespace(NamespaceDeclaration) WriteNamespace(NamespaceDeclaration) WriteNamespace(NamespaceDeclaration)

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

WriteNode(XamlReader) WriteNode(XamlReader) WriteNode(XamlReader) WriteNode(XamlReader)

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

WriteStartMember(XamlMember) WriteStartMember(XamlMember) WriteStartMember(XamlMember) WriteStartMember(XamlMember)

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

WriteStartObject(XamlType) WriteStartObject(XamlType) WriteStartObject(XamlType) WriteStartObject(XamlType)

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

WriteValue(Object) WriteValue(Object) WriteValue(Object) WriteValue(Object)

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

Explicit Interface Implementations

IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose() IDisposable.Dispose()

See Dispose().

Applies to