StackOverFlow Exception while Writing the Object Graph in to XAML
- by Jose
I am trying to Write an object stream into a XAML file but i end up in StackoverFlowException .
In the CallStack i could see "The maximum number of stack frames supported by Visual Studio has been exceeded"
This is the piece of code i'm trying to execute.
StreamWriter xamlStream =new StreamWriter(File.OpenWrite("a.xaml"));
string myXaml = System.Windows.Markup.XamlWriter.Save(objectInstance);
xamlStream.Write(myXaml);
Thanks ...!