อ่านในภาษาอังกฤษ แก้ไข

แชร์ผ่าน


XamlXmlWriter Constructors

Definition

Initializes a new instance of the XamlXmlWriter class.

Overloads

XamlXmlWriter(Stream, XamlSchemaContext)

Initializes a new instance of the XamlXmlWriter class from a stream.

XamlXmlWriter(TextWriter, XamlSchemaContext)

Initializes a new instance of the XamlXmlWriter class from a TextWriter basis.

XamlXmlWriter(XmlWriter, XamlSchemaContext)

Initializes a new instance of the XamlXmlWriter class from a XmlWriter basis.

XamlXmlWriter(Stream, XamlSchemaContext, XamlXmlWriterSettings)

Initializes a new instance of the XamlXmlWriter class from a stream using a writer settings object.

XamlXmlWriter(TextWriter, XamlSchemaContext, XamlXmlWriterSettings)

Initializes a new instance of the XamlXmlWriter class from a TextWriter basis using a settings object.

XamlXmlWriter(XmlWriter, XamlSchemaContext, XamlXmlWriterSettings)

Initializes a new instance of the XamlXmlWriter class from a XmlWriter basis using a settings object.

XamlXmlWriter(Stream, XamlSchemaContext)

Initializes a new instance of the XamlXmlWriter class from a stream.

C#
public XamlXmlWriter(System.IO.Stream stream, System.Xaml.XamlSchemaContext schemaContext);

Parameters

stream
Stream

The stream to write.

schemaContext
XamlSchemaContext

The XAML schema context for the XAML writer.

Exceptions

stream is null.

-or-

schemaContext is null.

Applies to

.NET Framework 4.8.1 และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

XamlXmlWriter(TextWriter, XamlSchemaContext)

Initializes a new instance of the XamlXmlWriter class from a TextWriter basis.

C#
public XamlXmlWriter(System.IO.TextWriter textWriter, System.Xaml.XamlSchemaContext schemaContext);

Parameters

textWriter
TextWriter

The TextWriter that writes the output.

schemaContext
XamlSchemaContext

The XAML schema context for the XAML writer.

Exceptions

textWriter or schemaContext is null.

Applies to

.NET Framework 4.8.1 และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

XamlXmlWriter(XmlWriter, XamlSchemaContext)

Initializes a new instance of the XamlXmlWriter class from a XmlWriter basis.

C#
public XamlXmlWriter(System.Xml.XmlWriter xmlWriter, System.Xaml.XamlSchemaContext schemaContext);

Parameters

xmlWriter
XmlWriter

The XmlWriter that writes the output.

schemaContext
XamlSchemaContext

The XAML schema context for the XAML writer.

Exceptions

xmlWriter or schemaContext is null.

Applies to

.NET Framework 4.8.1 และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

XamlXmlWriter(Stream, XamlSchemaContext, XamlXmlWriterSettings)

Initializes a new instance of the XamlXmlWriter class from a stream using a writer settings object.

C#
public XamlXmlWriter(System.IO.Stream stream, System.Xaml.XamlSchemaContext schemaContext, System.Xaml.XamlXmlWriterSettings settings);

Parameters

stream
Stream

The stream to write.

schemaContext
XamlSchemaContext

The XAML schema context for the XAML writer.

settings
XamlXmlWriterSettings

An instance of XamlXmlWriterSettings, which typically has specific non-default settings.

Exceptions

stream or schemaContext is null

Remarks

Do not change any values of the settings object after the XamlXmlWriter instance is constructed. XamlXmlWriter cannot update its internal settings based on settings values that are mutable at run time. Settings should be provided for initialization only. You can merge settings from an active XAML writer by using one of the XamlXmlWriterSettings constructor signatures; however, you must then apply these settings to a new XAML writer instance instead of attempting to adjust the existing one.

Applies to

.NET Framework 4.8.1 และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

XamlXmlWriter(TextWriter, XamlSchemaContext, XamlXmlWriterSettings)

Initializes a new instance of the XamlXmlWriter class from a TextWriter basis using a settings object.

C#
public XamlXmlWriter(System.IO.TextWriter textWriter, System.Xaml.XamlSchemaContext schemaContext, System.Xaml.XamlXmlWriterSettings settings);

Parameters

textWriter
TextWriter

The TextWriter that writes the output.

schemaContext
XamlSchemaContext

The XAML schema context for the XAML writer.

settings
XamlXmlWriterSettings

An instance of XamlXmlWriterSettings, which typically has specific non-default settings.

Exceptions

textWriter or schemaContext is null.

Remarks

Do not change any values of the settings object after the XamlXmlWriter instance is constructed. XamlXmlWriter cannot update its internal settings based on settings values that are mutable at run time. Settings should be provided for initialization only. You can merge settings from an active XAML writer by using one of the XamlXmlWriterSettings constructor signatures; however, you must then apply these settings to a new XAML writer instance instead of attempting to adjust the existing one.

Applies to

.NET Framework 4.8.1 และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10

XamlXmlWriter(XmlWriter, XamlSchemaContext, XamlXmlWriterSettings)

Initializes a new instance of the XamlXmlWriter class from a XmlWriter basis using a settings object.

C#
public XamlXmlWriter(System.Xml.XmlWriter xmlWriter, System.Xaml.XamlSchemaContext schemaContext, System.Xaml.XamlXmlWriterSettings settings);

Parameters

xmlWriter
XmlWriter

The XmlWriter that writes the output.

schemaContext
XamlSchemaContext

The XAML schema context for the XAML writer.

settings
XamlXmlWriterSettings

An instance of XamlXmlWriterSettings, which typically has specific non-default settings.

Exceptions

xmlWriter or schemaContext is null.

Remarks

Do not change any values of the settings object after the XamlXmlWriter instance is constructed. XamlXmlWriter cannot update its internal settings based on settings values that are mutable at run time. Settings should be provided for initialization only. You can merge settings from an active XAML writer by using one of the XamlXmlWriterSettings constructor signatures; however, you must then apply these settings to a new XAML writer instance instead of attempting to adjust the existing one.

Applies to

.NET Framework 4.8.1 และรุ่นอื่นๆ
ผลิตภัณฑ์ เวอร์ชัน
.NET Framework 4.0, 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1, 4.7.2, 4.8, 4.8.1
Windows Desktop 3.0, 3.1, 5, 6, 7, 8, 9, 10