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 = ""; } }); }
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); } }