I got a Xaml file that starts as follows:
<FlowDocument x:Name="flowDocument" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:Drawing="clr-namespace:System.Drawing;assembly=System.Drawing"
The current solution uses StremReader, referring to the physical path of the xaml file using flowdocument, and then parses the data in the template.
This is an invalid solution, so I need to get a flowdocument with a link to the physical path.
I would like to use an xmlns namespace or similar in my C # code and do
string result = XamlWriter.Save(flowDocument)
And use the result to parse.
Suggestions?
source share