Like Visual studio or any other IDE, Dynamically created controls in a tab page has to be saved and retrieved back is the task. I have tried the methodology of converting mycontrolsclass which has dynamically created controls in a list into json which will be saved to database and retrieved back. The stackoverflow error happens when the entire mycontrolsclass has been serialised to json. So thought of having a xaml content to database. Several tutorials helps out to get xaml content of a wpf window physical file but not aware of getting a xamlcontent out of a window which has dynamically created controls.
Tried looping through LogicalTreeHelper class too but i couldnt get the exact xaml. Is my methodology correct or how can i get xaml for dynamically created controls?