示例#1
0
 void ic_ContactTyping(object sender, IMPPClient.TypingEventArgs e)
 {
     this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () =>
     {
         if (e.IsTyping)
         {
             typingIndicatorBlock.Text = e.From + " is typing";
         }
         else
         {
             typingIndicatorBlock.Text = "";
         }
     });
 }
示例#2
0
        void ic_ContactTyping(object sender, IMPPClient.TypingEventArgs e)
        {
            Action a = new Action(() =>
            {
                if (e.IsTyping)
                {
                    //typingIndicatorBlock.Text = e.From + " is typing";
                }
                else
                {
                    //typingIndicatorBlock.Text = "";
                }
            });

            if (Dispatcher == null)
            {
                a();
            }
            else
            {
                Dispatcher.BeginInvoke(a);
            }
        }