XamlXmlWriterSettings.CloseOutput Property

Definition

Gets or sets a value that specifies whether the XamlXmlWriter should close immediately on Dispose or other operations, or whether the XAML writer should instead write the buffer output before closing. Use this setting with caution; closing immediately can result in invalid XAML that cannot be loaded again.

public bool CloseOutput { get; set; }

Property Value

true if XamlXmlWriter immediately closes on a Dispose or similar operations. false if the remaining buffer output is written before the XamlXmlWriter is released. The default is false.

Remarks

This setting influences the logic of XamlXmlWriter.Dispose, which calls Close on the underlying XmlWriter or TextWriter when CloseOutput is true; or it calls Flush (again tied to the underlying XmlWriter or TextWriter) if CloseOutput is false.

Applies to

产品 版本
.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