04-07-2010, 10:20 PM
Hello Peter,
It took me some time before I figured it out.
You are probably using an evaluation version of ReaderWmf.
Here some brushes are replaced by DEMO text - a DrawingBrush is used to draw it.
The demo text can be replaced by gray color by simply setting the ShowDemoTextInEvaluation to false.
Paste2Xaml does this automatically.
So you will need to use:
I think this should work.
It took me some time before I figured it out.
You are probably using an evaluation version of ReaderWmf.
Here some brushes are replaced by DEMO text - a DrawingBrush is used to draw it.
The demo text can be replaced by gray color by simply setting the ShowDemoTextInEvaluation to false.
Paste2Xaml does this automatically.
So you will need to use:
Code:
Ab2d.ReaderWmf reader = new Ab2d.ReaderWmf();
reader.ShowDemoTextInEvaluation = false;
reader.Read(fileName);
string xaml = reader.GetXaml(new Ab2d.Common.ReaderWmf.SilverlightXamlWriterSettings());
System.IO.File.WriteAllText(fileName, xaml);I think this should work.

