2

Why we can not handle the tapped event of richtextblock, I want to get the tapped point of the richtextblock or richtextblockoverflow, how to workaround?

K Mehta
  • 10,323
  • 4
  • 46
  • 76
Infi Xu
  • 45
  • 4
  • The events are there, what do you mean by "not handle the tapped event" ? Can you provide a self contained code sample illustrating the problem? – Benjamin Gruenbaum Sep 08 '13 at 06:22
  • 2
    I just did a test, put a richtextblock in the main page, and add tapped event handler for the richtextblock, but the method will never be fired. And if I set the isselectionenable of the richtextblock to false, the tapped event can be handled. That the problem, thanks – Infi Xu Sep 08 '13 at 06:56

1 Answers1

3

if you set IsTextSelectionEnabled to false its work but you cant use ScrollViewer to scroll i solved this with this issue

this.RichTextBlock.AddHandler(TappedEvent, new TappedEventHandler(RichTextBlock_Tapped), true);

private void medical_history_Tapped(object sender, TappedRoutedEventArgs e)
{
}

hope this helped you!