private void Service_HoverPointReceived(object sender, HoverPointReceivedEventArgs e) { string hoverPointCoords = string.Empty; switch (e.Phase) { case Wacom.Ink.InputPhase.Begin: case Wacom.Ink.InputPhase.Move: hoverPointCoords = string.Format("X:{0:0.0}, Y:{1:0.0}", e.X, e.Y); break; } Dispatcher.Invoke(DispatcherPriority.Background, new Action(() => { textBlockHoverCoordinates.Text = hoverPointCoords; })); }
private void OnHoverPointReceived(object sender, HoverPointReceivedEventArgs e) { string hoverPointCoords = string.Empty; switch (e.Phase) { case Wacom.Ink.InputPhase.Begin: case Wacom.Ink.InputPhase.Move: hoverPointCoords = string.Format("X:{0:0.0}, Y:{1:0.0}", e.X, e.Y); break; } var ignore = this.Dispatcher.RunAsync(CoreDispatcherPriority.Normal, () => { textBlockHoverCoordinates.Text = hoverPointCoords; }); }