XamlBinaryWriter Class

Definition

Produces a pre-parsed binary representation of a XAML production.

public ref class XamlBinaryWriter sealed
/// [Windows.Foundation.Metadata.ContractVersion(Windows.Foundation.UniversalApiContract, 65536)]
/// [Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
/// [Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
class XamlBinaryWriter final
[Windows.Foundation.Metadata.ContractVersion(typeof(Windows.Foundation.UniversalApiContract), 65536)]
[Windows.Foundation.Metadata.MarshalingBehavior(Windows.Foundation.Metadata.MarshalingType.Agile)]
[Windows.Foundation.Metadata.Threading(Windows.Foundation.Metadata.ThreadingModel.Both)]
public sealed class XamlBinaryWriter
Public NotInheritable Class XamlBinaryWriter
Inheritance
Object Platform::Object IInspectable XamlBinaryWriter
Attributes

Windows requirements

Device family
Windows 10 (introduced in 10.0.10240.0)
API contract
Windows.Foundation.UniversalApiContract (introduced in v1.0)

Remarks

The binary representation of XAML uses an XBF file extension. The binary representation enables performance advantages versus loading and parsing a XAML file as text. Loading the binary representation is most useful when loading XAML files that define large resources, such as the generic.xaml files that define templates.

XamlBinaryWriter is not intended for use by typical app code. It is intended for use by tools and processes that are directly involved in producing an app package on a developer's machine.

The XBF format is intended to be write-once. Anyone compiling into the XBF format should always maintain that same XAML in its text representation, so that tools or processes can edit the XAML, and so that the source XAML remains human-readable.

Methods

Write(IVector<IRandomAccessStream>, IVector<IRandomAccessStream>, IXamlMetadataProvider)

Produces a binary representation of XAML. Input streams are produced in text representation, and output streams are populated with XAML in binary (XBF) representation.

Important

XamlBinaryWriter is not intended for use by typical app code. It is intended for use by tools and processes that are directly involved in producing an app package on a developer's machine.

Applies to