Unusual windows Phone Contacts and calendar (contacts and calendars)

Source: Internet
Author: User

Introduced

Unique device for Windows Phone 7.5 (SDK 7.1)

Get contact-related data

Get calendar-related data

Example

1, show how to get contact data

ContactPictureConverter.cs

Using System; 
Using System.Net; 
Using System.Windows; 
Using System.Windows.Controls; 
Using System.Windows.Documents; 
Using System.Windows.Ink; 
Using System.Windows.Input; 
Using System.Windows.Media; 
Using System.Windows.Media.Animation; 
   
Using System.Windows.Shapes; 
Using Microsoft.Phone.UserData; 
Using System.IO; 
   
Using Microsoft.phone; 
    Namespace Demo.contactsandcalendar {public class ContactPictureConverter:System.Windows.Data.IValueConverter {//Extract picture from contact, convert picture to WriteableBitmap type object and return public object convert (object value, type TargetType 
            , object parameter, System.Globalization.CultureInfo culture) {Contact contacts = value as contact; 
   
            if (contact = = null) return null; Converts the contact picture to an object of type WriteableBitmap and returns this object Stream ImageStream = Contacts. 
            Getpicture (); if (ImageStream!= null) return Picturedecoder.decodejpeg (ImageSTream); 
        return null;  The public object Convertback (object value, Type targettype, object parameter, System.Globalization.CultureInfo 
        Culture) {throw new NotImplementedException (); } 
    } 
}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.