Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1770
Taking actions based on specific areas selected
posted

I display formatted text in the XamRichTextEditor in sections which represents different events. I might have one or more of these event sections. There is nothing special about these sections. They contain text and some tables. They are separated by multiple blank lines. 

I have a requirement where someone would want to double click on one of the sections and that would cause something like this in the xamdatagrid:

<i:EventTrigger EventName="MouseDoubleClick" >
<i:InvokeCommandAction Command="{Binding EventSelectionCommand}"
CommandParameter="{Binding ElementName=ReportGrid, Path=ActiveCell}" />
</i:EventTrigger>
</i:Interaction.Triggers>

I would also need to pass back the internal ID associated with the event so I can do further queries in the database.

But the xamRichTextEditor does not seem to have a MouseDoubleClick event and even if it did how would I be able to tell which event section someone double clicked on? Is there a way I can accomplish this? I think I could use a context menu but I would rather have the double click or perhaps a button in the control for each section. 

What would be the best way of doing this? Any suggestions would help. Thanks.

  • 34430
    Suggested Answer
    Offline posted

    Hello KrisVice,

    Thank you for your post.

    I am not entirely sure an EventTrigger for MouseDoubleClick is really going to work here, as I believe that you will need to keep track of the mouse position to really be able to accomplish this functionality you are looking to achieve. However, I am still a little unsure of how your "sections" in the XamRichTextEditor are being set up, and so I can't really draw a full explanation for this as of yet.

    Are you simply using separate paragraph nodes in the editor to set up your sections, or are you utilizing some other type of functionality of the control? Would it be possible for you to please provide some more detail on this so I can continue to investigate this functionality you are looking to achieve?

    Please let me know if you have any other questions or concerns on this matter.

    Sincerely,
    Andrew
    Associate Developer
    Infragistics Inc.
    www.infragistics.com/support