Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8617445
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T05:51:36+00:00 2026-06-12T05:51:36+00:00

In a Windows Store app I can only store WinRT types in the ApplicationSettings,

  • 0

In a Windows Store app I can only store WinRT types in the ApplicationSettings, according to the documentation. For roamed settings that should be held together I can use ApplicationDataCompositeValue. Trying to store an instance of an own class or struct results in an Exception with the message ” WinRT information: Error trying to serialize the value to be written to the application data store. Additional Information: Data of this type is not supported”. The term “trying to serialize” indicates that there must be some way so serialize a type for the application data API.

Does anyone know how I could achieve that?

I tried DataContract serialization but it did not work.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T05:51:37+00:00Added an answer on June 12, 2026 at 5:51 am

    I think custom/own types are not supported.

    See http://msdn.microsoft.com/en-us/library/windows/apps/hh464917.aspx:
    “The Windows Runtime data types are supported for app settings.”

    But you can serialize your objects to XML and save as string… (see code below)

    public static string Serialize(object obj)
    {
        using (var sw = new StringWriter()) 
        {
            var serializer = new XmlSerializer(obj.GetType());
            serializer.Serialize(sw, obj);
            return sw.ToString();
        }
    }
    
    public static T Deserialize<T>(string xml)
    {
        using (var sw = new StringReader(xml))
        {
            var serializer = new XmlSerializer(typeof(T));
            return (T)serializer.Deserialize(sw);
        }
    }
    

    https://github.com/MyToolkit/MyToolkit/blob/master/src/MyToolkit/Serialization/XmlSerialization.cs

    Check out this class too:

    https://github.com/MyToolkit/MyToolkit/wiki/XmlSerialization

    Disclaimer: The above links are from my project

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have known that Surface RT version can only run Windows Store app. So,
I am creating a Windows 8 app that needs to contain two main types
I have a WinRT Metro app (XAML/C#, Windows Release Preview) that manages documents. The
I am writing a Windows Store App toy application for Windows 8. It has
I am not experienced in Windows Store (aka Metro) app XAML, so perhaps I
I am working on a multi-platform app (Mono) that will store text in a
Im working on a MVVM Windows phone app that displays weather info. When the
Does Windows (or NTFS in general) store the name of the application that created
I want to develop an app for my own use only for Windows Phone
We have an MSI installer for a .Net WinForms app for Windows XP that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.