Exemple #1
0
 private void InsertSingleChatMessage(Messageobject msg)
 {
     App.Current.Dispatcher.Invoke(() =>
     {
         ChatMessageList.Insert(0, msg.MessageObjectToBubbleItem());
     });
 }
Exemple #2
0
 /// <summary>
 /// 显示单个消息气泡
 /// </summary>
 /// <param name="message"></param>
 public void AddSingleChatMessage(Messageobject message)
 {
     if (ServiceLocator.Current.GetInstance <MainViewModel>().Sess.Jid == message.jid)
     {
         //Add the single to ChatMessageList
         ChatMessageList.Add(message.MessageObjectToBubbleItem());
         Messenger.Default.Send(true, ChatBubbleListControl.ScrollChatBubbleMessageToBottom);//自动滚动
         SendReadMsgAsync(new List <Messageobject> {
             message
         });                                                   //发送已读
     }
 }