Hi,
Does the persistence framework work with the xamMap controls? It errors on Save() when I attempt to save the state of the map.
Regards,
Chris
Hello Chris,
I am very glad that you have found a solution to your issue. Please do not hesitate to contact us if you have any questions.
Thank you for using Infragistics controls.
This issue was first raised well over a year ago, so as you can imagine is no longer an issue as we have simply moved on and done things a different way.
I am just checking your progress on the issue. If you require any further assistance please do not hesitate to ask.
Thank you for your post. I have been researching your issue. After the research it appears that the available isolated storage is not enough to save the state of the XamMap. I can suggest the following blog from our colleague Mihail Mateev: http://ko.infragistics.com/community/blogs/mihail_mateev/archive/2010/06/29/using-the-infragistics-control-persistence-framework-with-xamgrid.aspx , where he explains how to increase the available isolated storage. Please do not hesitate to contact us if you have any further questions.
Have now tried this with the simplest of Persistence Settings and still no joy. The following code results in a StackOverflow exception from System.Windows.dll being thrown:
private void Button_Click(object sender, RoutedEventArgs e) { var settings = new PersistenceSettings { SavePersistenceOptions = PersistenceOption.OnlySpecified }; var pnpi = new PropertyNamePersistenceInfo {PropertyName = "Width"}; settings.PropertySettings.Add(pnpi); var stream = PersistenceManager.Save(map, settings); using (var iso = IsolatedStorageFile.GetUserStoreForApplication()) { if (iso.FileExists("map")) iso.DeleteFile("map"); using (var isoStream = new IsolatedStorageFileStream("map", FileMode.OpenOrCreate, iso)) { isoStream.Write(stream.ToArray(), 0, (int)stream.Length); } } }
All I wish to persist is the WindowZoom, WindowScale and WindowCenter of the map.
Is this possible with the Persistence Framework?