Getting Error "The type initializer for 'Telerik.Windows.Persistence.PersistenceManager' threw an exception."

2 posts, 1 answers
  1. Vivek
    Vivek avatar
    50 posts
    Member since:
    Jul 2011

    Posted 09 Aug 2011 Link to this post

    Hi Team,

    I am very new for this control. here is my scenario.

    I have viewer and I am adding a image in the canvas and showing to the user, now user have all options e.g user can rotate the image, they can zoom the image and they can pan the image after the zoom, I need to save this  user state, Now user can go to the print preview click where user will get the original image not the zoomed one, now If user will close the print preview I want to show the user the same zoomin postion and pan postion where he left the image.

    I tired with first look example but its not working. 

    if (!PrintPreviewClick)
    bool PrintPreviewClick = false;
           System.IO.Stream stream;
           private void SaveState()
               IsolatedStorageProvider isoStorageProvider = new IsolatedStorageProvider();
     /// <summary>
           /// Reset the Print page, clear down all the watermark, border, header,footer
           /// </summary>
           public void ResetPrintPage()
               PrintPreviewClick = false;
               //var ppth = new Path()
               //    Data = new RectangleGeometry()
               //    {
               //        Rect = new Rect(page.MediaMinX, page.MediaMinY, page.Width, page.Height),
               //    },
               //    Fill = new SolidColorBrush(PaperColor),
               //pageCanvas.Children.Insert(0, ppth);
           private void ReloadState()
               IsolatedStorageProvider isoStorageProvider = new IsolatedStorageProvider();

    Could you please let me know the apprach.


  2. Answer
    Alex Fidanov
    Alex Fidanov avatar
    637 posts

    Posted 10 Aug 2011 Link to this post

    Hello Vivek,

    I am not sure exactly what control you are trying to persist or which properties. Is it possible to provide us with a sample or more detailed information on this so that we can look into it? Please note that the PersistenceFramework saves only the UI-related properties of the elements.

    Kind regards,
    Alex Fidanov
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get now >>

Back to Top