You can parse the diagram xaml to XElement and then return the ToString()
method of this object. The parsing will set each tag on you line. Here is an example in code:
var xml =
// get diagram string
XElement doc = XElement.Parse(xml);
var beautifiedXaml = doc.ToString();
Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos
and start improving your app based on facts, not hunches.