Exception Encountered in Samples

3 posts, 0 answers
  1. Mark
    Mark avatar
    44 posts
    Member since:
    Jun 2009

    Posted 07 Oct 2011 Link to this post

    Hey Guys,

    I seem to be having a lot of trouble getting the Persistence Framework to work at all.  No matter whether I try to use IsolatedStorage or a stream, I get the following exception when I try to load the persisted data:

    "Index was out of range. Must be non-negative and less than the size of the collection.
    Parameter name: index"

    Has anyone see this before, or know what I might possible be missing?

    Thanks,
    Mark
  2. Alex Fidanov
    Admin
    Alex Fidanov avatar
    636 posts

    Posted 10 Oct 2011 Link to this post

    Hi Mark,

    I am not sure what your setup is, but here is the code that I am using and it is working as expected:

    <TextBox telerik:PersistenceManager.StorageId="textBox" VerticalAlignment="Top"/>



    this.Loaded += (s, e) =>
                {
                    IsolatedStorageProvider provider = new IsolatedStorageProvider();
                    provider.LoadFromStorage();
                };
     
                Application.Current.Exit += (s, e) =>
                {
                    IsolatedStorageProvider provider = new IsolatedStorageProvider();
                    provider.SaveToStorage();
                };
    Please let me know what I am missing.

    Regards,
    Alex Fidanov
    the Telerik team

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

  3. UI for WPF is Visual Studio 2017 Ready
  4. Mark
    Mark avatar
    44 posts
    Member since:
    Jun 2009

    Posted 10 Oct 2011 Link to this post

    Hi Alex,

    Thanks for your reponse.  I have tried many things, some of which look exactly like you have posted.  I will submit a support ticket with my project.  Hopefully it will help provide the guidance I need.

    Thanks,
    Mark.
Back to Top