I am trying to clone a WPF bound object (a listbox) with code like the following
pgeIncidentReport newPage = new pgeIncidentReport();
newPage.SetReportData();
string listXaml = XamlWriter.Save(newPage.lstUsers);
However, when you view the listXaml string, I noticed that my databinding directives, for both the list itself and the DataTemplate are blank and no longer there. Is there a reason why that is being removed? Is there another way to clone objects that will maintain all of the settings?