DynamicXaml.MarkupSystem.XamlWriter.XamlWriter C# (CSharp) Method

XamlWriter() public method

public XamlWriter ( TextWriter output, XamlWriterSettings settings = null, bool closeOutputStream = true ) : System
output System.IO.TextWriter
settings XamlWriterSettings
closeOutputStream bool
return System
        public XamlWriter(TextWriter output, XamlWriterSettings settings = null, bool closeOutputStream = true)
        {
            _writer = XmlWriter.Create(output,
                new XmlWriterSettings { CloseOutput = closeOutputStream, Indent = true, IndentChars = "  ", OmitXmlDeclaration = true });

            if (settings == null)
            {
                StartRoot("ContentControl");
                return;
            }

            settings.RegisterReferences(this);
            StartRoot(settings.RootElement ?? "ContentControl");
            _writer.WriteAttributeString("xmlns", "x", null, "http://schemas.microsoft.com/winfx/2006/xaml");
            WriteAllReferences();
            settings.ApplyCustomizations(this);
        }