void conversation_OnImageMessageReceived(object sender, AVIMImageMessage e)
 {
     var title = e.Title;
     
 }
 public Task<Tuple<bool, AVIMImageMessage>> SendImageMessageAsync(AVIMImageMessage avImageMessage)
 {
     return InternalExtensions.OnSuccess<Tuple<bool, AVIMFileMessageBase>, Tuple<bool, AVIMImageMessage>>(this.SendFileMessageAsync((AVIMFileMessageBase)avImageMessage), (Func<Task<Tuple<bool, AVIMFileMessageBase>>, Tuple<bool, AVIMImageMessage>>)(x => new Tuple<bool, AVIMImageMessage>(x.Result.Item1, avImageMessage)));
 }
        private void btn_sendImg_Click(object sender, RoutedEventArgs e)
        {
            MediaLibrary library = new MediaLibrary();
            var photo = library.Pictures[0];

            AVIMImageMessage imgMessage = new AVIMImageMessage(photo.Name, photo.GetImage());
            imgMessage.Attributes = new Dictionary<string, object>() 
            { 
              {"w","q"}
            };
            imgMessage.Title = "发自我的WP";
            conversation.SendImageMessageAsync(imgMessage);
        }