Baml2006Reader Baml2006Reader Baml2006Reader Baml2006Reader Class


Processes XAML in optimized BAML form and produces a XAML node stream.

public ref class Baml2006Reader : System::Xaml::XamlReader, System::Xaml::IXamlLineInfo
public class Baml2006Reader : System.Xaml.XamlReader, System.Xaml.IXamlLineInfo
type Baml2006Reader = class
    inherit XamlReader
    interface IXamlLineInfo
Public Class Baml2006Reader
Inherits XamlReader
Implements IXamlLineInfo


BAML form is an optimized form of XAML used by the WPF XAML implementation. It is optimized in the sense that it uses internal lookups and tokens for commonly used types or members. The optimization is useful as an implementation detail that addresses packaging size and load time for WPF application scenarios that involve XAML. The Baml2006Reader reader class constitutes much of the public API surface that a WPF application developer has for interacting with BAML.

The XAML optimized to BAML form may need to be localized. Localization of XAML and possible tools pathways for doing so is not discussed in this topic. See Globalization for WPF.

Baml2006Reader uses an internally implemented XAML schema context. This schema context provides the logic necessary for looking up the types in BAML form, including referencing the optimizations and tokens that are inherent in BAML.

The main scenario for Baml2006Reader is to use it as the XamlReader implementation that you pass to a call to XamlReader.Load.


Baml2006Reader(Stream) Baml2006Reader(Stream) Baml2006Reader(Stream) Baml2006Reader(Stream)

Initializes a new instance of the Baml2006Reader class based on an input stream.

Baml2006Reader(Stream, XamlReaderSettings) Baml2006Reader(Stream, XamlReaderSettings) Baml2006Reader(Stream, XamlReaderSettings) Baml2006Reader(Stream, XamlReaderSettings)

Initializes a new instance of the Baml2006Reader class based on an input stream and reader settings.

Baml2006Reader(String) Baml2006Reader(String) Baml2006Reader(String) Baml2006Reader(String)

Initializes a new instance of the Baml2006Reader class, based on the file name of a local file to read.


IsDisposed IsDisposed IsDisposed IsDisposed

Gets whether Dispose(Boolean) has been called.

(Inherited from XamlReader)
IsEof IsEof IsEof IsEof

Gets a value that reports whether the reader position is at the end of file.

Member Member Member Member

Gets the current member at the reader position, if the reader position is on a StartMember.

Namespace Namespace Namespace Namespace

Gets the XAML namespace from the current node.

NodeType NodeType NodeType NodeType

Gets the type of the current node.

SchemaContext SchemaContext SchemaContext SchemaContext

Gets an object that provides schema context information for the information set.

Type Type Type Type

Gets the XamlType of the current node.

Value Value Value Value

Gets the value of the current node.


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

Closes the XAML node stream.

(Inherited from XamlReader)
Dispose(Boolean) Dispose(Boolean) Dispose(Boolean) Dispose(Boolean)

Releases the unmanaged resources used by the Baml2006Reader 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)
Read() Read() Read() Read()

Provides the next XAML node from the source BAML, if a node is available.

ReadSubtree() ReadSubtree() ReadSubtree() ReadSubtree()

Returns a XamlReader that is based on the current XamlReader, where the returned XamlReader is used to iterate through a subtree of the XAML node structure.

(Inherited from XamlReader)
Skip() Skip() Skip() Skip()

Skips the current node and advances the reader position to the next node.

(Inherited from XamlReader)
ToString() ToString() ToString() ToString()

Returns a string that represents the current object.

(Inherited from Object)

Explicit Interface Implementations

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

Releases all resources used by the current instance of the XamlReader class.

(Inherited from XamlReader)
IXamlLineInfo.HasLineInfo IXamlLineInfo.HasLineInfo IXamlLineInfo.HasLineInfo IXamlLineInfo.HasLineInfo

See HasLineInfo.

IXamlLineInfo.LineNumber IXamlLineInfo.LineNumber IXamlLineInfo.LineNumber IXamlLineInfo.LineNumber

See LineNumber.

IXamlLineInfo.LinePosition IXamlLineInfo.LinePosition IXamlLineInfo.LinePosition IXamlLineInfo.LinePosition

See LinePosition.

Applies to