Animating Windows Phone Listboxes: Listing 2

Deserialization of Flickr data.

[DataContract]
public class FlickrData
{
    [DataMember(Name = "items")]
    public FlickrItem[] Items { get; set; }

    [DataContract]
    public class FlickrItem
    {
        [DataMember(Name = "title")]
        public string Title { get; set; }

        [DataMember(Name="media")]
        public FlickrMedia Media { get; set; }

        [DataContract]
        public class FlickrMedia
        {
            [DataMember(Name ="m")]
            public string Url { get; set; }
        }

        [IgnoreDataMember]
        public string ImageUrl
        {
            get { return Media != null ? Media.Url : null; }
        }
    }
}

About the Author

Nick Randolph runs Built to Roam, a consulting company that specializes in training, mentoring and assisting other companies build mobile applications. With a heritage in rich client applications for both the desktop and a variety of mobile platforms, Nick currently presents, writes and educates on the Windows Phone platform.

comments powered by Disqus

Featured

Subscribe on YouTube