Telerik UI for Windows Phone by Progress

This article explains how you can create a new content type in Everlive

When using the EverliveCloudProvider as a storage to your data, you need to make sure that the models that you have in your application are correctly mapped to the content types that you have defined on the server. Here's one example for the model that you may have in your application:

CopyC#
public class Task : DataItem
{
    private string name;
    private string notes;
    private bool isCompleted;
    private TaskPriority priority;

    public Task()
    {
        this.Priority = TaskPriority.medium;
    }

    public string Name
    {
        get
        {
            return this.name;
        }
        set
        {
            if (this.name != value)
            {
                this.name = value;
                this.OnPropertyChanged("Name");
            }
        }
    }

    public string Notes
    {
        get
        {
            return this.notes;
        }
        set
        {
            if (this.notes != value)
            {
                this.notes = value;
                this.OnPropertyChanged("Notes");
            }
        }
    }

    public bool IsCompleted
    {
        get
        {
            return this.isCompleted;
        }
        set
        {
            if (this.isCompleted != value)
            {
                this.isCompleted = value;
                this.OnPropertyChanged("IsCompleted");
            }
        }
    }

    public TaskPriority Priority
    {
        get
        {
            return this.priority;
        }
        set
        {
            if (this.priority != value)
            {
                this.priority = value;
                this.OnPropertyChanged("Priority");
            }
        }
    }
}

Note

Please note that the model inherits from DataItem which contains the properties needed by Everlive for the objects it stores.

Then you need to go to Everlive and define the Task content type there as well. To create a new content type, select Types from the left-side menu in Everlive and then choose "Create a Content type":

Cloud Controls Everlive Content Type

Then add new fields that correspond to the fields of the model and save the new content type:

Cloud Controls Everlive Task Item