Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic how to add context menu in the latest diagram lite (Read 4268 times)
bink
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 18
Joined: Oct 28th, 2010
how to add context menu in the latest diagram lite
Aug 16th, 2012 at 7:50am
Print Post  
Hi,

We recently upgraded MindFusion.Diagramming.Silverlight to version 2.2.0.27163.  It went well except for the context menu stopped working.

Our current code is :  ContextMenuService.SetContextMenu(diagram, menus);

Could you provide an example of context menu that work with the current version?  We are using silverlight 5 at the moment.


Regards
Bill
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: how to add context menu in the latest diagram lite
Reply #1 - Aug 16th, 2012 at 12:04pm
Print Post  
Hi,

The control now handles right clicks internally and that might be preventing the service from showing menus automatically. You can open the menu from Diagram.Clicked or NodeClicked event handlers:

Code
Select All
<tkit:ContextMenu Name="contextMenu">
...
void OnNodeClicked(object sender, NodeEventArgs e)
{
    if (e.MouseButton == MouseButton.Right)
        contextMenu.IsOpen = true;
} 



I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
bink
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 18
Joined: Oct 28th, 2010
Re: how to add context menu in the latest diagram lite
Reply #2 - Aug 17th, 2012 at 12:55am
Print Post  
Thanks Stoyan! It solved my problem.
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint