Is there a way to format XAM generated when a flow document is saved? Currently, all of this is run simultaneously in one line, and I want to break it into my elements, with line break and indenting it makes it a little easier to read. Here is the code I'm using to save a FlowDocument in a WPF RichTextBox as a XAML file: // entire document around TextRange textRange Create a TextRange side = new TextRange (myRichTextBox.Document.ContentStart, myRichTextBox.Document .contentEnd); // save the file using the file (file stream fs = file. Create (filename)) {textRange.Save (fs, DataFormats.Xaml); } Savings work fine, but as I mentioned, JPAM has been generated, all this goes together, no indentation or line breaks for its various elements Is: & lt; Section xmlns = "http://schemas.microsoft.com/winfx/2006/xaml/presentation" xml: space = "preserve" Tekstelinement = "left" Lainhait = "auto" Hashipineshn = enabled = "false...
Comments
Post a Comment